:root {
    --plan-ink: #171a1f;
    --plan-muted: #626873;
    --plan-soft: #f6f4ef;
    --plan-paper: #fffdf8;
    --plan-line: rgba(23, 26, 31, 0.14);
    --plan-purple: #6d5dfc;
    --plan-purple-dark: #4b39da;
    --plan-green: #245f51;
    --plan-warm: #ead7b7;
    --pointer-x: 50%;
    --pointer-y: 42%;
}

.plan-essay-page {
    color: var(--plan-ink);
    background:
        radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(109, 93, 252, 0.13), transparent 28rem),
        linear-gradient(180deg, #ffffff 0, var(--plan-soft) 620px, #fffdf8 100%);
}

.plan-essay-page button,
.plan-essay-page a {
    font: inherit;
}

.plan-essay-nav {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--plan-line);
    backdrop-filter: blur(18px);
}

.plan-essay-nav .nav-brand,
.plan-essay-nav a {
    color: var(--plan-ink);
}

.plan-kicker {
    margin: 0 0 12px;
    color: var(--plan-green);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.archive-hero,
.parallel-worlds,
.archive-desk-final,
.execution-chain {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.archive-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(440px, 0.82fr);
    gap: 42px;
    align-items: center;
    min-height: 820px;
    padding: 144px 0 72px;
}

.archive-hero-copy h1 {
    max-width: 820px;
    margin: 0;
    color: var(--plan-ink);
    font-size: clamp(4rem, 10vw, 8.4rem);
    line-height: 0.88;
    letter-spacing: 0;
}

.archive-lede {
    max-width: 720px;
    margin: 28px 0 0;
    color: #30363d;
    font-size: clamp(1.06rem, 2vw, 1.32rem);
    font-weight: 560;
    line-height: 1.82;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
}

.hero-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid rgba(23, 26, 31, 0.18);
    border-radius: 999px;
    background: #fff;
    color: var(--plan-ink);
    font-size: 0.92rem;
    font-weight: 850;
    text-decoration: none;
    transition: transform 170ms ease, border-color 170ms ease, color 170ms ease;
}

.hero-actions a:hover,
.hero-actions a:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(109, 93, 252, 0.55);
    color: var(--plan-purple-dark);
    outline: none;
}

.hero-archive-board {
    position: relative;
    min-height: 560px;
    border: 1px solid var(--plan-line);
    border-radius: 8px;
    overflow: hidden;
    background:
        linear-gradient(rgba(23, 26, 31, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 26, 31, 0.055) 1px, transparent 1px),
        #f5efe5;
    background-size: 34px 34px;
    box-shadow: 0 28px 80px rgba(23, 26, 31, 0.12);
}

.hero-archive-board::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 72% 18%, rgba(109, 93, 252, 0.17), transparent 19rem);
    pointer-events: none;
}

.hero-paper {
    position: absolute;
    margin: 0;
    width: 320px;
    padding: 10px 10px 12px;
    border: 1px solid rgba(23, 26, 31, 0.14);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 52px rgba(23, 26, 31, 0.15);
}

.hero-paper img {
    display: block;
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 4px;
}

.hero-paper figcaption {
    margin-top: 9px;
    color: var(--plan-muted);
    font-size: 0.82rem;
    font-weight: 850;
}

.hero-paper-main {
    left: 8%;
    top: 10%;
    width: 390px;
    transform: rotate(-4deg);
}

.hero-paper-note {
    right: 6%;
    top: 32%;
    transform: rotate(5deg);
}

.hero-paper-result {
    left: 28%;
    bottom: 8%;
    width: 340px;
    transform: rotate(2deg);
}

.worlds-heading h2,
.archive-desk-copy h2,
.execution-chain h2 {
    margin: 0;
    color: var(--plan-ink);
    font-size: clamp(2.35rem, 5vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: 0;
}

.chain-grid span {
    color: var(--plan-purple);
    font-size: 0.78rem;
    font-weight: 900;
}

.parallel-worlds {
    padding: 82px 0 70px;
    border-top: 1px solid var(--plan-line);
}

.worlds-heading {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.62fr);
    gap: 34px;
    align-items: end;
    margin-bottom: 30px;
}

.worlds-heading p:not(.plan-kicker) {
    margin: 0;
    color: #343941;
    font-size: 1.02rem;
    line-height: 1.76;
}

.reading-lens {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.reading-lens span {
    display: block;
    padding: 12px 14px;
    border: 1px solid rgba(23, 26, 31, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--plan-ink);
    font-size: 0.94rem;
    font-weight: 850;
    line-height: 1.45;
}

.world-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.46fr);
    gap: 18px;
    align-items: start;
}

.world-poster-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.world-poster {
    position: relative;
    display: grid;
    grid-template-rows: auto auto 1fr auto auto 168px;
    min-height: 560px;
    overflow: hidden;
    padding: 22px;
    border: 1px solid rgba(23, 26, 31, 0.16);
    border-radius: 8px;
    background:
        linear-gradient(rgba(23, 26, 31, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 26, 31, 0.045) 1px, transparent 1px),
        #fffdf8;
    background-size: 28px 28px;
    color: var(--plan-ink);
    cursor: pointer;
    text-align: left;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.world-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(109, 93, 252, 0), rgba(109, 93, 252, 0.1));
    opacity: 0;
    transition: opacity 180ms ease;
    pointer-events: none;
}

.world-poster:hover,
.world-poster:focus-visible,
.world-poster.active {
    transform: translateY(-6px);
    border-color: rgba(109, 93, 252, 0.58);
    box-shadow: 0 24px 70px rgba(23, 26, 31, 0.13);
    outline: none;
}

.world-poster:hover::before,
.world-poster.active::before {
    opacity: 1;
}

.world-index,
.world-type,
.world-years,
.world-proof {
    position: relative;
    z-index: 1;
    display: block;
}

.world-index {
    color: var(--plan-purple);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.world-type {
    margin-top: 12px;
    color: var(--plan-muted);
    font-size: 0.88rem;
    font-weight: 850;
}

.world-poster strong {
    position: relative;
    z-index: 1;
    margin-top: 18px;
    color: var(--plan-ink);
    font-size: clamp(1.72rem, 3vw, 2.65rem);
    line-height: 1.03;
    letter-spacing: 0;
}

.world-years {
    margin-top: 20px;
    font-size: 1.05rem;
    font-weight: 900;
}

.world-line {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 1px;
    margin: 18px 0;
    background: rgba(23, 26, 31, 0.18);
}

.world-proof {
    min-height: 48px;
    color: var(--plan-muted);
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.45;
}

.world-poster img {
    position: relative;
    z-index: 1;
    align-self: end;
    display: block;
    width: 100%;
    height: 168px;
    object-fit: cover;
    border: 1px solid rgba(23, 26, 31, 0.1);
    border-radius: 6px;
    filter: grayscale(0.12);
}

.world-inspector {
    position: sticky;
    top: 92px;
    min-height: 560px;
    padding: 24px;
    border: 1px solid rgba(23, 26, 31, 0.16);
    border-radius: 8px;
    background: #171a1f;
    color: #fff;
    box-shadow: 0 24px 70px rgba(23, 26, 31, 0.16);
}

.inspector-topline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.inspector-topline span,
.inspector-tags span {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.78rem;
    font-weight: 850;
}

.world-inspector h3 {
    margin: 70px 0 0;
    color: #fff;
    font-size: clamp(1.9rem, 4vw, 3.1rem);
    line-height: 1.04;
    letter-spacing: 0;
}

.world-inspector p {
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.75;
}

.world-inspector ul {
    display: grid;
    gap: 11px;
    margin: 24px 0 0;
    padding-left: 18px;
}

.world-inspector li {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.55;
}

.inspector-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 30px;
}

.inspector-tags span {
    border-color: rgba(109, 93, 252, 0.5);
    color: #cbc6ff;
}

.archive-desk-final {
    padding: 76px 0;
    border-top: 1px solid var(--plan-line);
}

.archive-desk-copy {
    max-width: 900px;
}

.archive-desk-copy p:not(.plan-kicker) {
    max-width: 720px;
    margin: 20px 0 0;
    color: #343941;
    font-size: 1.02rem;
    line-height: 1.76;
}

.evidence-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
    gap: 18px;
    align-items: start;
    margin-top: 34px;
}

.evidence-stack {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.evidence-card {
    position: relative;
    display: grid;
    grid-template-rows: 210px auto;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(23, 26, 31, 0.15);
    border-radius: 8px;
    background: #fff;
    color: var(--plan-ink);
    cursor: zoom-in;
    text-align: left;
    overflow: hidden;
    transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.evidence-card::after {
    content: "+";
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid rgba(23, 26, 31, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--plan-purple-dark);
    font-size: 1.2rem;
    font-weight: 900;
    opacity: 0;
    transform: scale(0.88);
    transition: opacity 170ms ease, transform 170ms ease;
}

.evidence-card:hover,
.evidence-card:focus-visible,
.evidence-card.active {
    transform: translateY(-5px);
    border-color: rgba(109, 93, 252, 0.56);
    box-shadow: 0 18px 48px rgba(23, 26, 31, 0.12);
    outline: none;
}

.evidence-card:hover::after,
.evidence-card:focus-visible::after,
.evidence-card.active::after {
    opacity: 1;
    transform: scale(1);
}

.evidence-card img {
    display: block;
    width: 100%;
    height: 210px;
    object-fit: cover;
    border-radius: 5px;
}

.evidence-card span {
    display: block;
    margin-top: 10px;
    color: var(--plan-muted);
    font-size: 0.86rem;
    font-weight: 900;
}

.evidence-note {
    position: sticky;
    top: 92px;
    min-height: 260px;
    padding: 24px;
    border: 1px solid rgba(23, 26, 31, 0.15);
    border-radius: 8px;
    background: #fffdf8;
}

.evidence-note span {
    color: var(--plan-purple);
    font-size: 0.84rem;
    font-weight: 900;
}

.evidence-note h3 {
    margin: 46px 0 0;
    color: var(--plan-ink);
    font-size: 2rem;
    letter-spacing: 0;
}

.evidence-note p {
    margin: 16px 0 0;
    color: #343941;
    line-height: 1.75;
}

.lightbox-open {
    overflow: hidden;
}

.evidence-lightbox[hidden] {
    display: none;
}

.evidence-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 28px;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(246, 244, 239, 0.86);
    cursor: zoom-out;
    backdrop-filter: blur(18px);
}

.lightbox-panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
    width: min(1180px, 94vw);
    max-height: min(860px, 90vh);
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(23, 26, 31, 0.18);
    border-radius: 10px;
    background: #fffdf8;
    box-shadow: 0 34px 110px rgba(23, 26, 31, 0.24);
    outline: none;
}

.lightbox-image-wrap {
    display: grid;
    align-items: start;
    min-height: 0;
    max-height: calc(90vh - 36px);
    overflow: auto;
    padding: 18px;
    background:
        linear-gradient(rgba(23, 26, 31, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 26, 31, 0.055) 1px, transparent 1px),
        #ffffff;
    background-size: 28px 28px;
}

.lightbox-image-wrap img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.lightbox-caption {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 34px 28px;
    border-left: 1px solid rgba(23, 26, 31, 0.12);
    background: #fffdf8;
}

.lightbox-caption span {
    color: var(--plan-purple);
    font-size: 0.86rem;
    font-weight: 900;
}

.lightbox-caption h3 {
    margin: 22px 0 0;
    color: var(--plan-ink);
    font-size: clamp(2rem, 4vw, 4rem);
    letter-spacing: 0;
    line-height: 0.94;
}

.lightbox-caption p {
    margin: 22px 0 0;
    color: #343941;
    font-size: 1rem;
    line-height: 1.76;
}

.lightbox-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid rgba(23, 26, 31, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--plan-ink);
    cursor: pointer;
    font-size: 1.8rem;
    line-height: 1;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
    border-color: rgba(109, 93, 252, 0.52);
    color: var(--plan-purple-dark);
    outline: none;
}

.execution-chain {
    padding: 72px 0 104px;
    border-top: 1px solid var(--plan-line);
}

.execution-chain h2 {
    max-width: 1020px;
}

.chain-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 34px;
}

.chain-grid details {
    min-height: 146px;
    padding: 20px;
    border: 1px solid rgba(23, 26, 31, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
}

.chain-grid summary {
    cursor: pointer;
    color: var(--plan-ink);
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.35;
}

.chain-grid summary::marker {
    color: var(--plan-purple);
}

.chain-grid p {
    margin: 18px 0 0;
    color: var(--plan-muted);
    line-height: 1.72;
}

.closing-note {
    margin-top: 16px;
    padding: 24px;
    border: 1px solid rgba(109, 93, 252, 0.32);
    border-radius: 8px;
    background:
        radial-gradient(circle at 92% 10%, rgba(109, 93, 252, 0.12), transparent 18rem),
        #171a1f;
    color: #fff;
}

.closing-note span {
    color: #cbc6ff;
    font-size: 0.88rem;
    font-weight: 900;
}

.closing-note p {
    max-width: 900px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.05rem;
    line-height: 1.75;
}

.plan-essay-footer {
    border-top: 1px solid var(--plan-line);
    background: #fff;
}

@media (max-width: 1080px) {
    .archive-hero,
    .worlds-heading,
    .world-workbench,
    .evidence-layout {
        grid-template-columns: 1fr;
    }

    .world-inspector,
    .evidence-note {
        position: relative;
        top: auto;
    }

    .lightbox-panel {
        grid-template-columns: 1fr;
        max-height: 92vh;
        overflow: auto;
    }

    .lightbox-image-wrap {
        max-height: 66vh;
    }

    .lightbox-caption {
        border-top: 1px solid rgba(23, 26, 31, 0.12);
        border-left: 0;
    }

    .world-poster-grid {
        grid-template-columns: 1fr;
    }

    .world-poster {
        min-height: 460px;
    }

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

@media (max-width: 720px) {
    .archive-hero,
    .parallel-worlds,
    .archive-desk-final,
    .execution-chain {
        width: min(100% - 28px, 1180px);
    }

    .archive-hero {
        min-height: auto;
        padding: 118px 0 58px;
    }

    .archive-hero-copy h1 {
        font-size: 4.2rem;
    }

    .archive-lede {
        font-size: 1rem;
        line-height: 1.72;
    }

    .hero-archive-board {
        min-height: 640px;
    }

    .hero-paper,
    .hero-paper-main,
    .hero-paper-note,
    .hero-paper-result {
        width: min(82vw, 330px);
    }

    .hero-paper-main {
        left: 8%;
        top: 7%;
    }

    .hero-paper-note {
        right: 5%;
        top: 36%;
    }

    .hero-paper-result {
        left: 12%;
        bottom: 6%;
    }

    .evidence-stack,
    .chain-grid {
        grid-template-columns: 1fr;
    }

    .world-poster {
        min-height: 420px;
        padding: 18px;
    }

    .world-poster strong {
        font-size: 1.9rem;
    }

    .world-inspector h3 {
        margin-top: 40px;
    }

    .evidence-card {
        grid-template-rows: 220px auto;
    }

    .evidence-card img {
        height: 220px;
    }

    .evidence-lightbox {
        padding: 12px;
    }

    .lightbox-panel {
        width: 100%;
    }

    .lightbox-image-wrap {
        max-height: 62vh;
        padding: 10px;
    }

    .lightbox-caption {
        padding: 22px;
    }

    .lightbox-caption h3 {
        font-size: 2.25rem;
    }
}
