/* #outlook: the nonlinear landscape. Columns: perturbative order (--c = 1..4);
   rows: frequency (--r = 1..3). Each topic is a small box in the colour of its
   part of the talk: filled, a result; dashed, an open question; half filled,
   partly open. Citations show on hover. */

#outlook { --mp-cp: #7A5BA6; --mp-sc: #3A6EA5; --mp-ex: #D9822B;
           --mp-y0: 236px; --mp-dy: 222px; --mp-h: 206px; }
:root[data-theme="dark"] #outlook { --mp-cp: #B49AD6; --mp-sc: #8CA3D0; --mp-ex: #E8A25E; }
#outlook .mp-cp { --k: var(--mp-cp); }
#outlook .mp-sc { --k: var(--mp-sc); }
#outlook .mp-ex { --k: var(--mp-ex); }

/* column widths: the second order, this talk, gets the most room */
#outlook [style*="--c: 1"] { --L: 300px;  --W: 320px; }
#outlook [style*="--c: 2"] { --L: 636px;  --W: 420px; }
#outlook [style*="--c: 3"] { --L: 1072px; --W: 330px; }
#outlook [style*="--c: 4"] { --L: 1418px; --W: 402px; }

#outlook .mp { position: absolute; inset: 0; }

/* column heads and row labels */
#outlook .mp-ch { position: absolute; left: var(--L); width: var(--W); top: 182px; text-align: center;
                  font-size: 32px; font-variant-caps: all-small-caps; letter-spacing: 0.06em; color: var(--muted); }
#outlook .mp-ch2 { color: var(--accent); }
#outlook .mp-row { position: absolute; right: calc(1920px - 300px + 28px); white-space: nowrap;
                   top: calc(var(--mp-y0) + (var(--r) - 1) * var(--mp-dy) + var(--mp-h) / 2 - 22px);
                   font-size: 34px; color: var(--muted); }

/* the cells */
#outlook .mp-t { position: absolute; box-sizing: border-box; left: var(--L); width: var(--W);
                 top: calc(var(--mp-y0) + (var(--r) - 1) * var(--mp-dy)); height: var(--mp-h);
                 padding: 10px; border-radius: 14px; background: color-mix(in srgb, var(--ink) 4%, transparent);
                 display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 12px 10px; }
#outlook .mp-t.mp-q { background: none; border: 2px dashed var(--hair); }
#outlook .mp-t.mp-nr { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--muted) 10%, transparent) 0 10px, transparent 10px 20px);
                       border: 2px solid var(--hair); flex-direction: column; align-items: center; gap: 2px; }
#outlook .mp-nr b { font-weight: 400; font-size: 46px; }
#outlook .mp-nr span { font-size: 25px; color: var(--muted); }

/* the topics */
#outlook .mp-b { position: relative; display: inline-block; padding: 5px 14px 6px; border-radius: 9px;
                 font-size: 26px; line-height: 1.15; white-space: nowrap; color: var(--ink);
                 background: color-mix(in srgb, var(--k) 20%, var(--bg)); border: 2px solid var(--k); cursor: default; }
#outlook .mp-b.mp-open { background: var(--bg); border-style: dashed; color: var(--muted); font-style: italic; }
#outlook .mp-b.mp-half { border-style: dashed;
                         background: linear-gradient(110deg, color-mix(in srgb, var(--k) 20%, var(--bg)) 50%, var(--bg) 50%); }
#outlook .mp-b:has(.mp-pop):hover { z-index: 20; box-shadow: 0 0 0 3px color-mix(in srgb, var(--k) 35%, transparent); }

/* the citations: a card above the topic, on hover; its bottom padding bridges
   the gap, so the pointer can reach the links */
#outlook .mp-pop { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); padding: 8px 14px 18px;
                   width: max-content; max-width: 460px; white-space: normal; font-size: 19px; line-height: 1.3;
                   font-style: normal; color: var(--ink); text-align: center;
                   opacity: 0; visibility: hidden; transition: opacity 0.15s, visibility 0.15s; }
#outlook .mp-pop::before { content: ""; position: absolute; inset: 0 0 10px; z-index: -1; border-radius: 8px;
                           background: var(--bg); border: 1.5px solid var(--k); box-shadow: 0 4px 14px rgba(0,0,0,0.12); }
#outlook .mp-b:hover .mp-pop { opacity: 1; visibility: visible; }

/* resummations: a dashed arrow that draws from the third-order head to the all-orders head */
#outlook .mp-resum { position: absolute; left: 1318px; top: 124px; width: 190px; height: 90px; text-align: center;
                     font-size: 25px; font-style: italic; color: var(--accent); }
#outlook .mp-resum svg { position: absolute; left: 0; top: 42px; width: 190px; height: 40px; overflow: visible; }
#outlook .mp-resum path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-dasharray: 9 7; }
#outlook .mp-resum .mp-head { stroke-dasharray: none; stroke-linejoin: round; }

/* the key, under the map: the pictograms of #plan, each in the colour of its part */
#outlook .mp-key { position: absolute; left: 0; right: 0; top: 920px; display: flex; justify-content: center; gap: 40px; align-items: center; }
#outlook .mp-k { display: flex; align-items: center; gap: 8px; padding: 2px 16px 2px 8px; border-radius: 9px; font-size: 26px;
                 background: color-mix(in srgb, var(--k) 20%, var(--bg)); border: 2px solid var(--k); }
#outlook .mp-k .pg { width: 64px; height: 48px; }

/* builds. First order is there on arrival; second order on press 1; third on
   press 2; the topics pop in, row by row. On press 3 the arrow draws, then the
   all-orders column opens from the left. */
#outlook .mp-col[data-step] .mp-t, #outlook .mp-col[data-step] .mp-b {
    transition: opacity 0.45s ease, transform 0.45s ease, box-shadow 0.2s;
    transition-delay: calc(var(--r, 1) * 0.18s + var(--j, 0) * 0.09s - 0.18s), calc(var(--r, 1) * 0.18s + var(--j, 0) * 0.09s - 0.18s), 0s; }
#outlook .mp-t .mp-b { --r: inherit; }
#outlook .mp-col[data-step]:not(.shown) .mp-t { opacity: 0; }
#outlook .mp-col[data-step]:not(.shown) .mp-b { opacity: 0; transform: translateY(10px) scale(0.94); }

#outlook .mp-resum { clip-path: inset(-10px -10px -10px 0); transition: clip-path 0.8s ease; }
#outlook .mp-resum:not(.shown) { clip-path: inset(-10px 100% -10px 0); }
#outlook .mp-col4 { position: absolute; inset: 0; clip-path: inset(0 0 0 0); transition: clip-path 1.1s ease 0.7s; }
#outlook .mp-col4:not(.shown) { clip-path: inset(0 512px 0 0); transition-delay: 0s; }
#outlook .mp-col4 .mp-t, #outlook .mp-col4 .mp-b { transition-delay: 0s; }
