/* The prism is the scene; the article reader keeps its own styles. */
body.prism-variant[data-view="index"] {
    background: #0b0c0e;
    color: #eeefeb;
    overflow: hidden;
}
.prism-variant[data-view="index"] .topbar {
    background: none;
    border: 0;
    backdrop-filter: none;
    padding: 0 4.5%;
    height: 84px;
    z-index: 12;
}
.prism-variant .brand-mark {
    display: none;
}
.prism-variant .brand {
    gap: 10px;
}
.prism-variant .brand strong {
    font: 500 21px var(--font);
    letter-spacing: -0.06em;
}
.prism-variant[data-view="index"] .theme-button,
.prism-variant[data-view="index"] .variant-link {
    display: none;
}
.prism-variant[data-view="index"] .search-button {
    font: 11px var(--mono);
}
.prism-variant #indexView {
    position: relative;
    height: 100svh;
    min-height: 520px;
    max-width: none;
    margin: 0;
    padding: 0;
    isolation: isolate;
    touch-action: pan-x pinch-zoom;
    overflow: hidden;
    background: #0b0c0e;
}
.prism-scene,
.scene-shade,
.station-labels {
    position: absolute;
    inset: 0;
}
.prism-scene {
    z-index: 0;
    opacity: 0;
    transition: opacity 0.45s ease;
}
.prism-scene[data-ready="true"] {
    opacity: 1;
}
.prism-scene canvas {
    display: block;
    width: 100%;
    height: 100%;
}
.scene-shade {
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(
            90deg,
            #0b0c0e 0%,
            transparent 12%,
            transparent 94%,
            #0b0c0e 100%
        ),
        linear-gradient(0deg, #0b0c0e, transparent 22%);
}
/* While an edition bursts open, everything but its date clears out of the way. */
.scene-shade,
.scene-eyebrow,
#lineYear,
.scene-action {
    transition:
        opacity 0.32s ease-in,
        filter 0.32s ease-in;
}
:root[data-burst] .scene-shade,
:root[data-burst] .scene-eyebrow,
:root[data-burst] #lineYear,
:root[data-burst] .scene-action {
    opacity: 0;
    filter: blur(4px);
}
.scene-copy {
    position: absolute;
    z-index: 4;
    top: 12%;
    left: 68%;
    width: 38%;
    transform: translateX(-50%);
    pointer-events: none;
    text-align: center;
}
.scene-eyebrow {
    font: 10px var(--mono);
    letter-spacing: 0.035em;
    color: #a5aaac;
    margin: 0 0 20px;
    text-transform: uppercase;
}
.scene-date {
    font-size: clamp(42px, 4.7vw, 67px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.055em;
    white-space: nowrap;
    margin: 0;
}
.scene-date > span {
    display: block;
}
.scene-date > span + span {
    font: 300 19px var(--font);
    letter-spacing: 0;
    color: #a5aaac;
    margin-top: 10px;
}
.scene-action {
    margin-top: 21px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 13px;
}
.scene-action button {
    pointer-events: auto;
}
.scene-action .read-button {
    font: 11px var(--mono);
    gap: 28px;
    border-bottom: 1px solid #696a654f;
    padding: 11px 0;
}
.scene-action .read-button .arrow {
    color: #e1e2dc;
    font-size: 18px;
}
.scene-action .read-button:hover {
    color: #ff8f73;
}
.scene-action .reading-meta {
    font: 9px var(--mono);
    color: #999e9f;
}
.scene-bottom {
    position: absolute;
    z-index: 5;
    bottom: max(28px, env(safe-area-inset-bottom));
    left: 4.5%;
    right: 4.5%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    pointer-events: none;
}
.scene-hint {
    font: 9px var(--mono);
    color: #a5acad;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    white-space: nowrap;
    margin: 0;
}
.scene-hint span {
    display: block;
    font-size: 17px;
    margin-top: 10px;
    color: #e4e5df;
}
.scene-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    pointer-events: auto;
}
.scene-controls .round-button {
    border-color: #89929655;
    background: #0b0c0e70;
    color: #d9ddd8;
    width: 36px;
    height: 36px;
}
.scene-controls .round-button:disabled {
    opacity: 0.25;
}
.scene-controls .text-button {
    font: 10px var(--mono);
    color: #aeb7b8;
    padding: 12px 0;
}
.station-labels {
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}
.prism-pin {
    position: absolute;
    transform: translate(-50%, -100%);
    padding: 14px 13px;
    font: 10px var(--mono);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: #c0c5c3;
    pointer-events: auto;
    transition:
        color 0.2s,
        opacity 0.2s;
}
.prism-pin[aria-current="date"] {
    color: #ff9478;
}
.prism-pin:hover {
    color: #fff;
}
.prism-pin[hidden] {
    display: none;
}
.prism-variant #indexView button:focus-visible {
    outline: 1px solid #ff987c;
    outline-offset: 5px;
}
.scene-fallback {
    position: absolute;
    bottom: 135px;
    left: 10%;
    right: 10%;
    z-index: 5;
    color: #aeb4b6;
    max-width: 430px;
    font-size: 13px;
    line-height: 1.6;
}
.prism-variant[data-view="index"] .load-error {
    position: absolute;
    z-index: 10;
    top: 90px;
    left: 10%;
    right: 10%;
    margin: 0;
    background: #171c20;
}
.prism-variant .read-progress {
    background: #ee604b;
}
.prism-variant[data-view="index"] .skip {
    z-index: 30;
}
.prism-variant[data-view="index"] #readButton:disabled {
    opacity: 0.35;
}
.prism-variant[data-view="reader"] .brand strong {
    font-size: 16px;
}
@media (max-width: 700px) {
    .prism-variant[data-view="index"] .topbar {
        padding: 0 7%;
        height: 70px;
    }
    .prism-variant .brand strong {
        font-size: 19px;
    }
    .scene-copy {
        top: 15%;
        left: 50%;
        width: 88%;
    }
    .scene-date {
        font-size: clamp(39px, 10.5vw, 62px);
    }
    .scene-date > span + span {
        font-size: 17px;
        margin-top: 10px;
    }
    .scene-eyebrow {
        font-size: 9px;
        margin-bottom: 17px;
    }
    .scene-action {
        margin-top: 19px;
        gap: 13px;
    }
    .scene-action .read-button {
        font-size: 10px;
    }
    .scene-action .reading-meta {
        font-size: 9px;
    }
    .scene-bottom {
        bottom: max(24px, env(safe-area-inset-bottom));
        left: 7%;
        right: 7%;
        align-items: center;
    }
    .scene-controls {
        gap: 10px;
    }
    .scene-controls .round-button {
        width: 34px;
        height: 34px;
    }
    .scene-hint {
        bottom: 68px;
        font-size: 8px;
    }
    .scene-hint span {
        font-size: 15px;
        margin-top: 9px;
    }
    .prism-pin {
        font-size: 9px;
        padding: 15px 11px;
    }
    .scene-controls .text-button {
        font-size: 9px;
    }
    .scene-fallback {
        bottom: 165px;
        left: 8%;
        right: 8%;
        font-size: 12px;
    }
}
@media (max-height: 560px) and (min-width: 701px) {
    .scene-copy {
        top: 15%;
    }
    .scene-date {
        font-size: 41px;
    }
    .scene-action {
        margin-top: 9px;
    }
    .scene-eyebrow {
        margin-bottom: 10px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .prism-scene,
    .prism-pin {
        transition: none;
    }
}

/* JD News charcoal and red, with varied directional silhouettes. */
body.prism-variant[data-view="index"] {
    background: #0a0a0a;
    color: #e8e8e8;
    color-scheme: dark;
}
.prism-variant #indexView {
    background: #0a0a0a;
}
.prism-variant[data-view="index"] .topbar {
    color: #e8e8e8;
}
.prism-variant[data-view="index"] .brand,
.prism-variant[data-view="index"] .search-button {
    color: #e8e8e8;
}
.prism-variant[data-view="index"] .search-button svg {
    color: #ff6a5a;
}
.prism-variant[data-view="index"] .search-button:hover {
    color: #ff9a8f;
}
.scene-shade {
    background: linear-gradient(0deg, #0a0a0a 6%, #0a0a0a00 25%);
}
.scene-copy {
    top: 20%;
    left: 6%;
    width: 42%;
    transform: none;
    text-align: left;
}
.scene-eyebrow {
    color: #8e8585;
    letter-spacing: 0.1em;
}
.scene-date {
    font-size: clamp(44px, 5.2vw, 80px);
    font-weight: 350;
    letter-spacing: -0.065em;
}
.scene-date > span + span {
    color: #827878;
    font-size: 21px;
    margin-top: 9px;
}
.scene-action {
    align-items: flex-start;
    gap: 13px;
    margin-top: 26px;
}
.scene-action .read-button {
    color: #eecccc;
    border-color: #ff44444d;
    font-size: 11px;
}
.scene-action .read-button .arrow {
    color: #eecccc;
}
.scene-action .read-button:hover {
    color: #ff4444;
}
.scene-action .reading-meta {
    color: #978989;
}
/* The edition's podcast episode, beside Read once Apple lists it. */
.scene-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 30px;
}
.episode-link {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 0;
    font: 11px var(--mono);
    color: #b9a7a7;
    text-decoration: none;
    animation: lead-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* A button styled as the episode link: opens the "Read with agent" sheet. */
.agent-link {
    border: 0;
    background: none;
    cursor: pointer;
}
.episode-link[hidden] {
    display: none;
}
.episode-link svg {
    width: 15px;
    height: 15px;
    color: #ff6a5a;
}
.episode-link .arrow {
    font-size: 18px;
    line-height: 1;
    margin-left: 10px;
    color: #eecccc;
}
.episode-link:hover {
    color: #ff4444;
}
.prism-variant #indexView .episode-link:focus-visible {
    outline: 1px solid #ff4444;
    outline-offset: 5px;
}
.scene-hint {
    color: #8c8080;
}
.scene-hint span {
    color: #ff7771;
}
.scene-controls .round-button {
    color: #ccbbbb;
    border-color: #e5c5c52e;
    background: transparent;
}
.scene-controls .text-button {
    color: #b9a7a7;
}
.prism-pin {
    color: #c2a8a8;
    font: 12px var(--mono);
    font-weight: 400;
    letter-spacing: -0.035em;
    padding: 15px 12px;
    transform: translate(-8px, calc(-100% + var(--rise, 0px)));
}
.prism-pin[aria-current="date"] {
    color: #ff6666;
    font-size: 15px;
    font-weight: 500;
}
.prism-pin:hover {
    color: #ff9992;
}
.prism-variant #indexView button:focus-visible {
    outline-color: #ff4444;
}
.scene-fallback {
    color: #c1a3a3;
}
.prism-variant[data-view="index"] .load-error {
    background: #0a0a0a;
}
@media (max-width: 700px) {
    .scene-copy {
        left: 7%;
        top: 14%;
        width: 86%;
    }
    .scene-date {
        font-size: clamp(43px, 12.5vw, 68px);
    }
    .scene-date > span + span {
        font-size: 18px;
    }
    .scene-eyebrow {
        margin-bottom: 16px;
    }
    .scene-action {
        margin-top: 17px;
        gap: 9px;
    }
    .scene-action .read-button,
    .episode-link {
        font-size: 10px;
    }
    .scene-links {
        column-gap: 24px;
    }
    /* Keeps "Search" from reading as part of the month beside it. */
    .prism-variant[data-view="index"] .search-button {
        margin-right: 12px;
    }
    .prism-pin {
        font-size: 10px;
        padding: 15px 8px;
    }
    .prism-pin[aria-current="date"] {
        font-size: 12px;
    }
    .scene-hint {
        bottom: 63px;
    }
    .scene-controls {
        gap: 9px;
    }
    .scene-controls .round-button {
        height: 29px;
        width: 29px;
    }
    .scene-controls .text-button {
        font-size: 9px;
    }
}
@media (max-height: 580px) and (min-width: 701px) {
    .scene-copy {
        top: 18%;
    }
    .scene-date {
        font-size: 41px;
    }
    .scene-action {
        margin-top: 10px;
    }
}

/* A quiet light around the selected date, separate from the moving geometry. */
.prism-pin[aria-current="date"] {
    text-shadow: 0 0 18px #ff44445c;
    color: #ffaaa0;
}
.scene-controls {
    margin-left: auto;
}

/* Weights scenes: the past fades out behind the headline; labels hang on stems. */
.prism-scene:is([data-scene="weights"], [data-scene="vapor"], [data-scene="plexus"]) ~ .scene-shade {
    background:
        linear-gradient(
            90deg,
            #0a0a0acc 0%,
            #0a0a0a73 30%,
            #0a0a0a00 52%
        ),
        linear-gradient(0deg, #0a0a0a 3%, #0a0a0a00 17%);
}
.station-labels:is([data-scene="weights"], [data-scene="vapor"], [data-scene="plexus"]) .prism-pin::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 100%;
    width: 1px;
    height: max(0px, calc(var(--stem, 0px) - 12px));
    background: linear-gradient(#ff5a4a80, #ff5a4a00);
    pointer-events: none;
}
.station-labels:is([data-scene="weights"], [data-scene="vapor"], [data-scene="plexus"]) .prism-pin[aria-current="date"]::after {
    background: linear-gradient(#ff7a6acc, #ff5a4a00);
}
@media (max-width: 700px) {
    .prism-scene:is([data-scene="weights"], [data-scene="vapor"], [data-scene="plexus"]) ~ .scene-shade {
        background:
            linear-gradient(180deg, #0a0a0acc 0%, #0a0a0a00 42%),
            linear-gradient(0deg, #0a0a0a 5%, #0a0a0a00 24%);
    }
}

/* The edition's top stories: the lead in large type, then two more. */
.scene-copy .lead-stories {
    display: grid;
    gap: 11px;
    margin-top: 30px;
    max-width: 520px;
    /* Holds its height while the next edition loads, so nothing jumps. */
    min-height: 168px;
    align-content: start;
}
.scene-copy .preview-story {
    pointer-events: auto;
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 0 12px;
    align-items: start;
    padding: 0;
    border: 0;
    text-align: left;
    color: #b8abab;
    animation: lead-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--i, 0) * 80ms + 60ms);
}
.scene-copy .preview-story > span {
    font: 10px var(--mono);
    color: #ff6a5a;
    padding: 5px 0 0;
}
.scene-copy .preview-story strong {
    font-size: 14px;
    line-height: 1.45;
    font-weight: 400;
    max-width: none;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.scene-copy .preview-story:first-child {
    margin-bottom: 6px;
}
.scene-copy .preview-story:first-child > span {
    padding-top: 9px;
}
.scene-copy .preview-story:first-child strong {
    font-size: clamp(20px, 1.85vw, 27px);
    line-height: 1.22;
    letter-spacing: -0.028em;
    color: #f2eeec;
    -webkit-line-clamp: 3;
    text-wrap: balance;
}
.scene-copy .preview-story:hover strong {
    color: #ff9a8f;
}
.scene-copy .preview-story:focus-visible {
    outline: 1px solid #ff4444;
    outline-offset: 5px;
}
@keyframes lead-in {
    from {
        opacity: 0;
        transform: translateY(14px);
        filter: blur(6px);
    }
}
.lead-stories {
    transition:
        opacity 0.32s ease-in,
        filter 0.32s ease-in;
}
:root[data-burst] .lead-stories {
    opacity: 0;
    filter: blur(4px);
}
@media (max-width: 700px) {
    .scene-copy .lead-stories {
        margin-top: 20px;
        min-height: 50px;
    }
    .scene-copy .preview-story:not(:first-child) {
        display: none;
    }
    .scene-copy .preview-story:first-child strong {
        font-size: 19px;
    }
}
@media (max-height: 620px) and (min-width: 701px) {
    .scene-copy .lead-stories {
        min-height: 0;
        margin-top: 16px;
    }
    .scene-copy .preview-story:not(:first-child) {
        display: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    .scene-copy .preview-story,
    .episode-link {
        animation: none;
    }
}

/* Weights scenes: a small grid of weights pulses while the scene compiles. */
.prism-scene:has(.scene-loader) {
    opacity: 1;
}
.scene-loader {
    position: absolute;
    left: 66%;
    top: 42%;
    display: grid;
    justify-items: center;
    gap: 16px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: scene-loader-in 600ms cubic-bezier(0.22, 1, 0.36, 1) 300ms both;
}
.scene-loader-dots {
    display: grid;
    grid-template-columns: repeat(5, 4px);
    gap: 8px;
}
.scene-loader-dots i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ff4433;
    opacity: 0.15;
    animation: scene-loader-pulse 1400ms cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0ms) infinite;
}
.scene-loader-caption {
    font: 400 12px/16px var(--mono);
    letter-spacing: 0.04em;
    color: #8a7f7a;
}
@keyframes scene-loader-in {
    from {
        opacity: 0;
    }
}
@keyframes scene-loader-pulse {
    0%,
    100% {
        opacity: 0.15;
        box-shadow: none;
    }
    30% {
        opacity: 1;
        box-shadow: 0 0 8px #ff4433;
    }
}
@media (max-width: 700px) {
    .scene-loader {
        left: 50%;
        top: 72%;
    }
}
@media (prefers-reduced-motion: reduce) {
    .scene-loader-dots i {
        animation: none;
        opacity: 0.5;
    }
}
/* Until the weights are ready the headlines wait, so they are typed out once. */
.index-view:has(.scene-loader) .preview-story strong {
    visibility: hidden;
}
/* Weights scenes: the name of the source whose favicon the weights draw. */
.weights-caption {
    position: absolute;
    left: 0;
    top: 0;
    font: 400 12px/16px var(--mono);
    letter-spacing: 0.04em;
    white-space: nowrap;
    color: #ffb4a8;
    text-shadow: 0 0 12px #ff3b2499;
    pointer-events: none;
}
