/* ============================================================
   Section 07b - Command path
   A scroll story inside Security: one command from a recorded
   session goes through the checks in the order the user guide
   gives. The steps scroll and the stage stays. Without script,
   or on a screen too short to hold both, every step and every
   piece of evidence is listed in order.
   ============================================================ */

.nl-path-wrap {
    width: min(1180px, calc(100% - 40px));
    margin: 56px auto 72px;
}

.nl-path,
.nl-path__intro {
    --nl-path-ground: #111A2E;
    --nl-path-well: #080D1A;
    --nl-path-line: rgba(148, 163, 184, 0.16);
    --nl-path-line-strong: rgba(148, 163, 184, 0.3);
    --nl-path-text: #F5F8FF;
    --nl-path-body: #C5D0E5;
    --nl-path-muted: #90A1B9;
    --nl-path-faint: #62748E;
    --nl-path-blue: #3B82F6;
    --nl-path-on-blue: #FFFFFF;
    --nl-path-blue-wash: rgba(59, 130, 246, 0.12);
    --nl-path-blue-line: rgba(96, 165, 250, 0.42);
    --nl-path-cyan: #B8E6FE;
    --nl-path-ok: #4ADE80;
    --nl-path-ok-wash: rgba(34, 197, 94, 0.1);
    --nl-path-ok-line: rgba(74, 222, 128, 0.3);
    --nl-path-no: #F87171;
    --nl-path-glass: rgba(255, 255, 255, 0.06);
    --nl-path-shade: rgba(2, 6, 23, 0.85);
    --nl-path-glow: rgba(59, 130, 246, 0.5);
    --nl-path-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
    --nl-path-display: var(--nl-font, "Plus Jakarta Sans", sans-serif);
    /* The site header scrolls away with the hero, so the stage sticks near the top of the screen. */
    --nl-path-top: 32px;
    --nl-path-top-narrow: 12px;
}

.nl-path__intro {
    margin: 0 0 clamp(12px, 2.4vw, 28px);
    font: 500 12px/1.5 var(--nl-path-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nl-path-muted);
}

.nl-path {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(32px, 5vw, 76px);
    align-items: start;
}

.nl-path__steps {
    grid-column: 1;
    grid-row: 1;
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.nl-path__stage {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

.nl-path.is-live .nl-path__stage {
    position: sticky;
    top: var(--nl-path-top);
}

.nl-path__step {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    margin: 0;
    padding: 26px 0;
}

.nl-path__step + .nl-path__step {
    border-top: 1px solid var(--nl-path-line);
}

.nl-path.is-live .nl-path__step {
    min-height: 62vh;
    padding: 0;
    border-top: 0;
    opacity: 0.32;
    transition: opacity 0.35s ease;
}

.nl-path.is-live .nl-path__step.is-active {
    opacity: 1;
}

/* Room under the last step, so the stage stays in place while that step is read. */
.nl-path.is-live .nl-path__steps {
    padding-bottom: 20vh;
}

.nl-path__count {
    margin: 0;
    font: 500 11px/1 var(--nl-path-mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--nl-path-muted);
}

.nl-path__title {
    margin: 0;
    font: 600 clamp(1.4rem, 1.05rem + 1.1vw, 2rem)/1.15 var(--nl-path-display);
    letter-spacing: -0.026em;
    color: var(--nl-path-text);
    text-wrap: balance;
}

.nl-path__text {
    margin: 0;
    max-width: 46ch;
    font-size: 16.5px;
    line-height: 1.62;
    color: var(--nl-path-body);
}

.nl-path__text code {
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid var(--nl-path-line);
    background: var(--nl-path-glass);
    font: 500 0.88em/1.4 var(--nl-path-mono);
    color: var(--nl-path-cyan);
}

.nl-path__here {
    margin: 6px 0 0;
    max-width: 46ch;
    font: 500 13px/1.55 var(--nl-path-mono);
    color: var(--nl-path-cyan);
}

.nl-path__here span {
    display: block;
    margin-bottom: 4px;
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--nl-path-faint);
}

.nl-path__win {
    border-radius: 20px;
    background: var(--nl-path-well);
    border: 1px solid var(--nl-path-line-strong);
    box-shadow: 0 40px 80px -40px var(--nl-path-shade), 0 0 120px -40px var(--nl-path-glow);
    overflow: hidden;
}

.nl-path__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--nl-path-line);
    font: 500 11.5px/1.4 var(--nl-path-mono);
    color: var(--nl-path-muted);
}

.nl-path__bar-dots {
    display: inline-flex;
    gap: 6px;
    margin-right: 6px;
}

.nl-path__bar-dots i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--nl-path-line-strong);
}

.nl-path__pill {
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--nl-path-line);
    color: var(--nl-path-body);
}

.nl-path__bar-note {
    margin-left: auto;
}

.nl-path__cmd {
    margin: 0;
    padding: 14px 18px;
    border-bottom: 1px solid var(--nl-path-line);
    font: 500 13px/1.6 var(--nl-path-mono);
    color: var(--nl-path-text);
    overflow-wrap: anywhere;
}

.nl-path__cmd b {
    margin-right: 8px;
    font-weight: 500;
    color: var(--nl-path-faint);
}

.nl-path__trace {
    list-style: none;
    margin: 0;
    padding: 7px 10px;
    border-bottom: 1px solid var(--nl-path-line);
    display: grid;
    gap: 1px;
}

.nl-path__trace li {
    display: grid;
    grid-template-columns: 18px auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin: 0;
    padding: 6px 8px;
    border-radius: 9px;
    transition: background 0.3s ease, opacity 0.3s ease;
}

.nl-path__node {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--nl-path-ok);
    display: grid;
    place-items: center;
    font: 700 10px/1 var(--nl-path-mono);
    color: var(--nl-path-ok);
    transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.nl-path__gate {
    font: 600 13.5px/1.2 var(--nl-path-display);
    color: var(--nl-path-text);
    white-space: nowrap;
}

.nl-path__verdict {
    min-width: 0;
    font: 400 12px/1.3 var(--nl-path-mono);
    color: var(--nl-path-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nl-path__tag {
    padding: 5px 7px;
    border-radius: 6px;
    border: 1px solid var(--nl-path-line);
    font: 500 10px/1 var(--nl-path-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nl-path-muted);
}

.nl-path__tag--ok {
    color: var(--nl-path-ok);
    border-color: var(--nl-path-ok-line);
    background: var(--nl-path-ok-wash);
}

.nl-path__tag--ask {
    color: var(--nl-path-cyan);
    border-color: var(--nl-path-blue-line);
    background: var(--nl-path-blue-wash);
}

.nl-path.is-live .nl-path__trace li.is-todo {
    opacity: 0.4;
}

.nl-path.is-live .nl-path__trace li.is-todo .nl-path__node {
    border-color: var(--nl-path-line-strong);
    color: transparent;
}

.nl-path.is-live .nl-path__trace li.is-todo .nl-path__verdict,
.nl-path.is-live .nl-path__trace li.is-todo .nl-path__tag {
    visibility: hidden;
}

.nl-path.is-live .nl-path__trace li.is-active {
    background: var(--nl-path-blue-wash);
}

.nl-path.is-live .nl-path__trace li.is-active .nl-path__node {
    border-color: var(--nl-path-blue);
    background: var(--nl-path-blue);
    color: var(--nl-path-on-blue);
    box-shadow: 0 0 0 4px var(--nl-path-blue-wash);
}

.nl-path__now {
    display: none;
}

.nl-path__view {
    display: grid;
    padding: 16px 18px 18px;
}

.nl-path__ev {
    display: grid;
    gap: 10px;
    align-content: center;
    min-width: 0;
    margin: 0;
    padding: 14px 0;
}

.nl-path__ev + .nl-path__ev {
    border-top: 1px solid var(--nl-path-line);
}

.nl-path.is-live .nl-path__view {
    min-height: 272px;
}

.nl-path.is-live .nl-path__ev {
    grid-area: 1 / 1;
    padding: 0;
    border-top: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.16s ease, transform 0s linear 0.16s, visibility 0s linear 0.16s;
}

/* The block that leaves fades first, then the next one comes in, so two never read at once. */
.nl-path.is-live .nl-path__ev.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.32s ease 0.16s, transform 0.32s ease 0.16s, visibility 0s linear 0.16s;
}

.nl-path__ev-label {
    margin: 0;
    font: 500 10.5px/1.4 var(--nl-path-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--nl-path-faint);
}

.nl-path__ev-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--nl-path-muted);
}

.nl-path__ev-note code {
    font: 500 12px/1 var(--nl-path-mono);
    color: var(--nl-path-body);
}

.nl-path__ev-note code.nl-path__miss {
    text-decoration: line-through;
    color: var(--nl-path-no);
}

.nl-path__ev img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 236px;
    margin: 0 auto;
    border-radius: 10px;
    border: 1px solid var(--nl-path-line);
}

.nl-path__rows {
    display: grid;
    gap: 1px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--nl-path-line);
    background: var(--nl-path-line);
}

.nl-path__row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 9px 12px;
    background: var(--nl-path-ground);
    font-size: 13px;
    color: var(--nl-path-body);
}

.nl-path__row--wide {
    grid-template-columns: minmax(0, 0.62fr) minmax(0, 2fr);
}

.nl-path__row.is-this {
    background: linear-gradient(var(--nl-path-blue-wash), var(--nl-path-blue-wash)), var(--nl-path-ground);
    color: var(--nl-path-text);
}

.nl-path__row strong {
    font: 600 13px/1.3 var(--nl-path-display);
    color: var(--nl-path-text);
}

.nl-path__row em {
    margin-left: 8px;
    font: 500 11px/1 var(--nl-path-mono);
    font-style: normal;
    color: var(--nl-path-cyan);
}

.nl-path__res {
    font: 500 12px/1.3 var(--nl-path-mono);
}

.nl-path__res--no {
    color: var(--nl-path-no);
}

.nl-path__res--ask {
    color: var(--nl-path-cyan);
}

.nl-path__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.nl-path__chips code {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--nl-path-line);
    background: var(--nl-path-glass);
    font: 500 12px/1.3 var(--nl-path-mono);
    color: var(--nl-path-body);
}

.nl-path__chips code.is-this {
    color: var(--nl-path-text);
    border-color: var(--nl-path-blue-line);
    background: var(--nl-path-blue-wash);
}

.nl-path__chips span {
    align-self: center;
    font-size: 12.5px;
    color: var(--nl-path-muted);
}

.nl-path__ledger {
    display: grid;
    gap: 6px;
    margin: 0;
}

.nl-path__ledger div {
    display: grid;
    grid-template-columns: minmax(0, 0.4fr) minmax(0, 1fr);
    gap: 12px;
    font: 500 12px/1.5 var(--nl-path-mono);
}

.nl-path__ledger dt {
    margin: 0;
    color: var(--nl-path-faint);
}

.nl-path__ledger dd {
    margin: 0;
    color: var(--nl-path-text);
    overflow-wrap: anywhere;
    text-wrap: pretty;
}

@media (min-width: 960px) and (max-height: 760px) {
    .nl-path.is-live .nl-path__bar {
        display: none;
    }

    .nl-path.is-live .nl-path__view {
        min-height: 232px;
    }

    .nl-path.is-live .nl-path__ev img {
        max-height: 200px;
    }
}

@media (max-width: 959px) {
    .nl-path {
        display: block;
    }

    .nl-path__steps {
        margin-top: 20px;
    }

    .nl-path.is-live .nl-path__steps {
        margin-top: 0;
    }

    .nl-path.is-live .nl-path__stage {
        top: var(--nl-path-top-narrow);
        z-index: 2;
    }

    .nl-path.is-live .nl-path__win {
        border-radius: 16px;
        box-shadow: 0 24px 34px -14px var(--nl-path-shade);
    }

    .nl-path.is-live .nl-path__bar {
        display: none;
    }

    .nl-path.is-live .nl-path__cmd {
        padding: 10px 14px;
        font-size: 11.5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nl-path.is-live .nl-path__trace {
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        padding: 10px 12px 4px;
        border-bottom: 0;
    }

    .nl-path.is-live .nl-path__trace li,
    .nl-path.is-live .nl-path__trace li.is-active {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        padding: 0;
        background: none;
    }

    .nl-path.is-live .nl-path__gate,
    .nl-path.is-live .nl-path__verdict,
    .nl-path.is-live .nl-path__tag {
        display: none;
    }

    .nl-path.is-live .nl-path__now {
        display: block;
        margin: 0;
        padding: 4px 14px 9px;
        border-bottom: 1px solid var(--nl-path-line);
        font: 500 11.5px/1.4 var(--nl-path-mono);
        color: var(--nl-path-cyan);
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nl-path.is-live .nl-path__view {
        min-height: 0;
        padding: 10px 14px 14px;
    }

    .nl-path.is-live .nl-path__ev {
        gap: 8px;
    }

    .nl-path.is-live .nl-path__ev img {
        max-height: 150px;
    }

    .nl-path.is-live .nl-path__ev-note--wide {
        display: none;
    }

    .nl-path__row {
        padding: 7px 10px;
    }

    .nl-path__row em {
        display: block;
        margin: 3px 0 0;
    }

    .nl-path.is-live .nl-path__step {
        min-height: 62vh;
        justify-content: flex-end;
        padding-bottom: 8vh;
    }

    .nl-path.is-live .nl-path__steps {
        padding-bottom: 0;
    }

    .nl-path__text {
        font-size: 15.5px;
    }

    .nl-path__row {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    }

    .nl-path__row--wide {
        grid-template-columns: minmax(0, 0.62fr) minmax(0, 2fr);
    }

    .nl-path__pol {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nl-path.is-live .nl-path__step,
    .nl-path.is-live .nl-path__ev,
    .nl-path__trace li,
    .nl-path__node {
        transition: none;
    }
}
