/* Auto exposure and relative adjustment: Lightroom's Develop window, drawn from screenshots in its own points through --u
   (1000 x 798), runs off the right edge of the screen; the steps and the player come from story.css and js/story.js.
   The markup is generated by work/lr-preview. */
main { overflow-x: clip; } /* the window's overhang makes no sideways scroll */
.lw-block > .st-copy { position: relative; z-index: 1; }
.lw-block { display: grid; grid-template-columns: 356px minmax(0, 1fr); column-gap: 44px; align-items: center; padding: 110px 0; }
.lw-block .st-heading { margin-bottom: 22px; font-size: min(clamp(30px, 3.2vw, 42px), 11cqi); white-space: nowrap; }
.lw-block .st-step p { font-size: 18px; line-height: 1.5; color: #4a5766; text-wrap: pretty; }
.lw-how { margin-top: 22px; }
.lw-how .st-key { margin: 0 .5em 0 .25em; font-size: 16px; white-space: nowrap; }
.lw-block h3 { font-size: 25px; }
/* the window runs off the right edge of the screen */
.lw-wrap { margin-right: calc(-1 * max(28px, (100vw - 1064px) / 2)); max-width: 1000px; }
.st-scene.lw-scene { aspect-ratio: 1000 / 798; overflow: visible; border-radius: 0; background: none; }
.lw-scene > * { --u: calc(100cqw / 1000); }
.lw.st-frame { left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; border-radius: calc(10 * var(--u)); background: #000; -webkit-mask: none; mask: none; box-shadow: 0 28px 70px #1b2a3d47, 0 4px 14px #1b2a3d33; font-family: "Myriad Pro", "Myriad Set Pro", -apple-system, "Helvetica Neue", sans-serif; }
.lw-in { position: absolute; inset: 0; }
.lw-in > *, .lw-row > * { position: absolute; box-sizing: border-box; }
.lw-row { position: absolute; inset: 0; pointer-events: none; }
.lw span { line-height: 1.24; white-space: nowrap; }
.lw-row.is-live span { color: #fff !important; }
.lw-thumb { left: calc((763 + 134 * var(--q) - 5.6) * var(--u)); width: calc(11.2 * var(--u)); height: calc(11.5 * var(--u)); overflow: visible; }
.lw-graph { background: linear-gradient(#383838, #404040 12px); } .lw-graph canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lw-photo { overflow: hidden; } .lw-photo img, .lw-cell img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(var(--s, 1)) brightness(calc(var(--b, 1) * (1 + .05 * (1 - var(--w, 1))))); }
.lw-photo::after, .lw-cell u::after { content: ""; position: absolute; inset: 0; background: var(--cast, #cdf8c9); mix-blend-mode: multiply; opacity: calc(1 - var(--w, 1)); }
.lw-cell { box-shadow: inset calc(-1 * var(--u)) 0 #7d7d7d, inset calc(1 * var(--u)) 0 #ffffff24; }
.lw-cell b { position: absolute; left: calc(10 * var(--u)); top: calc(2 * var(--u)); font-weight: 700; font-size: calc(13 * var(--u)); line-height: calc(17 * var(--u)); color: #00000070; }
.lw-cell u { position: absolute; left: 50%; top: calc(60 * var(--u)); transform: translate(-50%, -50%) scale(calc(1 + .07 * var(--pop, 0))); overflow: hidden; box-shadow: 0 0 0 calc(.8 * var(--u)) #111; text-decoration: none; }
/* a vertical photo opened in the big view sits in the grey, as Lightroom shows it */
.lw-photo.is-tall img { object-fit: contain; width: 100%; margin-left: 0; }
/* a photo takes its exposure: it lifts a little and light runs over it (no colored frame), and the Develop badge stays */
.lw-cell u > i { position: absolute; z-index: 1; inset: 0; background: linear-gradient(105deg, #fff0 calc(var(--sw, -.6) * 100% - 25%), #ffffff80 calc(var(--sw, -.6) * 100%), #fff0 calc(var(--sw, -.6) * 100% + 25%)); mix-blend-mode: screen; }
.lw-cell u > svg { position: absolute; z-index: 2; right: 0; bottom: 0; width: calc(15.5 * var(--u)); height: calc(15.5 * var(--u)); opacity: var(--bd, 0); }
/* the whole window goes quiet */
.lw-dim { position: absolute; z-index: 2; inset: 0; border-radius: calc(10 * var(--u)); background: #0b0c0fb3; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.lw-dim.is-on { opacity: 1; }
/* in the middle: the slider from the panel, large, and under it the selected thumbnails with their values */
.lw-up { position: absolute; z-index: 3; left: calc(49 * var(--u)); top: calc(196 * var(--u)); width: calc(600 * var(--u)); display: flex; flex-wrap: wrap; justify-content: center; column-gap: calc(50 * var(--u)); visibility: hidden; pointer-events: none; }
/* the slider lies on a piece of the panel; the label and the value take equal room, so the track is in the middle */
.lw-big { box-sizing: border-box; flex: 0 0 calc(555 * var(--u)); display: grid; grid-template-columns: calc(104 * var(--u)) 1fr calc(104 * var(--u)); column-gap: calc(14 * var(--u)); align-items: center; height: calc(74 * var(--u)); margin-bottom: calc(30 * var(--u)); padding: 0 calc(24 * var(--u)); border-radius: calc(14 * var(--u)); background: #505050; box-shadow: 0 calc(12 * var(--u)) calc(34 * var(--u)) #0006, inset 0 1px 0 #ffffff1c; color: #f2f2f2; font: 400 calc(23.5 * var(--u))/1.2 -apple-system, "SF Pro Display", sans-serif; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.lw-big span { line-height: 1.2; white-space: nowrap; }
.lw-big span:last-child { text-align: right; }
.lw-rail { position: relative; height: calc(7 * var(--u)); border-radius: calc(4 * var(--u)); background: linear-gradient(90deg, #3a3a3a, #5c5c5c 50%, #8c8c8c); box-shadow: 0 0 0 calc(2 * var(--u)) #0e0e0e, 0 calc(3 * var(--u)) 0 #6464648c; }
.lw-up[data-line="Tint"] .lw-rail { background: linear-gradient(90deg, #469a43, #5f8f5d 28%, #7a747a 52%, #a25ba2 82%, #b04fb0); }
.lw-knob { position: absolute; left: calc(var(--q, .5) * 100%); top: calc(-12 * var(--u)); width: calc(28 * var(--u)); height: calc(29 * var(--u)); margin-left: calc(-14 * var(--u)); overflow: visible; filter: drop-shadow(0 2px 4px #0008); }
.lw-up.is-on { visibility: visible; }
.lw-one u { position: relative; display: block; width: 100%; height: calc(90 * var(--u)); margin: 0 auto; overflow: hidden; border-radius: calc(4 * var(--u)); text-decoration: none; box-shadow: 0 calc(10 * var(--u)) calc(28 * var(--u)) #0007; }
.lw-one img { display: block; width: calc(100% + 2px); height: calc(100% + 2px); margin: -1px; max-width: none; object-fit: cover; filter: saturate(var(--s, 1)) brightness(calc(var(--b, 1) * (1 + .05 * (1 - var(--w, 1))))); }
.lw-one u::after { content: ""; position: absolute; inset: 0; background: var(--cast, #cdf8c9); mix-blend-mode: multiply; opacity: calc(1 - var(--w, 1)); }
.lw-one { flex: none; width: calc(90 * var(--r) * var(--u)); }
.lw-one p { display: flex; margin-inline: calc(-40 * var(--u)) !important; justify-content: center; align-items: center; height: calc(36 * var(--u)); margin: 0 0 calc(10 * var(--u)); color: #fff; font: 500 calc(21.5 * var(--u))/1 -apple-system, "SF Pro Display", sans-serif; letter-spacing: -.015em; font-variant-numeric: tabular-nums; white-space: nowrap; opacity: 0; transition: opacity .25s; }
.lw-up.is-on.is-open p { opacity: 1; transition: opacity .4s; }
.lw-one b { font-weight: 500; text-shadow: 0 0 calc(20 * var(--u)) rgba(255, 255, 255, calc(.5 * var(--g, 0))), 0 0 calc(6 * var(--u)) rgba(255, 255, 255, calc(.35 * var(--g, 0))); }
/* the common step: it opens beside every value and then goes into it */
/* the value and the step are one group in the middle of the photo */
.lw-one p > span { display: inline-flex; align-items: center; }
.lw-one small { width: calc(40 * var(--u) * var(--a, 0)); margin-left: calc(5 * var(--u) * var(--a, 0)); overflow: hidden; border-radius: calc(6 * var(--u)); background: #ffffff2e; text-align: center; font-size: calc(16 * var(--u)); line-height: calc(25 * var(--u)); opacity: var(--a, 0); }
.lw-scene .wg-widget { --lu: calc(100cqw / 1000); --u: calc(var(--lu) * .41); left: calc(634 * var(--lu)); top: calc(586 * var(--lu)); --shade: 0, 0, 0; }
.lw-scene .st-pointer { width: 26px; height: 26px; margin: -3px 0 0 -5px; }
.lw-menu { position: absolute; z-index: 5; right: calc(362 * var(--u)); bottom: calc(206 * var(--u)); width: calc(205 * var(--u)); padding: calc(5 * var(--u)); border-radius: calc(9 * var(--u)); background: #2b2b2df5; box-shadow: 0 0 0 .5px #000, inset 0 0 0 .5px #ffffff2e, 0 12px 36px #0007; opacity: 0; visibility: hidden; }
.lw-menu.is-on { opacity: 1; visibility: visible; }
.lw-menu p { position: relative; margin: 0; padding: calc(3 * var(--u)) calc(12 * var(--u)); border-radius: calc(5 * var(--u)); font: 400 calc(14 * var(--u))/calc(20 * var(--u)) -apple-system, sans-serif; color: #f0f0f0; white-space: nowrap; }
.lw-menu hr { margin: calc(5 * var(--u)) calc(12 * var(--u)); border: 0; border-top: 1px solid #ffffff26; }
.lw-menu .is-sub::after { content: "›"; position: absolute; right: calc(9 * var(--u)); top: 0; font-size: calc(19 * var(--u)); }
.lw-menu p.is-hot { background: #0a6cdf; color: #fff; }
.lw-submenu { right: calc(563 * var(--u)); bottom: calc(226 * var(--u)); width: calc(162 * var(--u)); z-index: 6; }
.lw-car { display: inline-block; margin-left: calc(6 * var(--u)); border: calc(3.4 * var(--u)) solid transparent; border-top: calc(4 * var(--u)) solid #8f8f8f; border-bottom: 0; }
.lw-photo img { width: calc(100% + 4px); margin-left: -2px; max-width: none; }
.lw-row span { transition: color .25s; }
/* the window ends exactly at the screen's edge until the screen is wider than it */
@media (min-width: 1001px) and (max-width: 1735px) { .lw.st-frame, .lw-dim { border-radius: calc(10 * var(--u)) 0 0 calc(10 * var(--u)); } }
@media (max-width: 1000px) {
  .lw-block { display: flex; flex-direction: column; align-items: stretch; gap: 34px; padding: 80px 0 50px; }
  .lw-wrap { order: -1; max-width: none; margin: 0; }
  .lw-block .st-heading { font-size: clamp(32px, 5vw, 42px); }
}
/* on a phone: the photo, the widget and the six selected thumbnails; the right panel stays off the screen */
@media (max-width: 700px) {
  .lw-block { padding: 60px 0 40px; }
  .lw-wrap { margin: 0 -20px; overflow-x: clip; }
  .st-scene.lw-scene { width: 148%; }
  .lw-block .st-heading { font-size: min(34px, 9.4vw); }
  .lw-block .st-step p { font-size: 17px; }
  .lw.st-frame, .lw-dim { border-radius: 0; }
}

/* A block that lists its steps: both are on screen at once under one heading, the one the window plays is marked
   by a blue bar and full ink, the other rests paler. No dashes and no Play: it loops while it is in view. */
.lw-block.is-list .st-steps { gap: 26px; }
.lw-block.is-list .st-step { grid-area: auto; visibility: visible; opacity: 0.5; transform: none; padding-left: 18px; border-left: 3px solid #e1e6ec; cursor: pointer; transition: opacity 0.3s ease, border-color 0.3s ease; }
.lw-block.is-list .st-step.is-on { opacity: 1; border-left-color: #0872d6; }
.lw-block.is-list .st-step.is-out { transform: none; transition: opacity 0.3s ease, border-color 0.3s ease; }
.lw-block.is-list .st-step:hover { opacity: 0.8; }
.lw-block.is-list .st-step.is-on:hover { opacity: 1; }
.lw-block.is-list .st-step h3 { margin-bottom: 8px; }
.lw-block.is-list .st-dashes, .lw-block.is-list .st-play { display: none !important; }

/* Lightroom's progress bar in the top strip while Auto exposure runs: no words, a grey line, a black gap, the bar */
.lw-prog { left: calc(15 * var(--u)); top: calc(4 * var(--u)); width: calc(184 * var(--u)); height: calc(9 * var(--u)); padding: calc(1 * var(--u)); border: calc(1 * var(--u)) solid #424242; opacity: 0; transition: opacity .2s; }
.lw-prog.is-on { opacity: 1; }
.lw-prog i, .lw-prog b { display: block; height: 100%; background: #424242; }
.lw-prog b { background: #d6d6d6; transform: scaleX(0); transform-origin: 0 50%; }

/* the photo reaches a pixel past its frame on every side, so the color cast laid over it never shows as a light edge */
.lw-cell u img { width: calc(100% + 2px); height: calc(100% + 2px); margin: -1px; max-width: none; }
/* The cast is a multiply layer over the photo. On the rounded, smoothed edge there is little photo under it, so it showed
   its own pale green there; a dark base under each thumbnail makes that edge pixel dark, like the frame around it. */
.lw-one u, .lw-cell u { background: #111; }

/* the color cast now comes from the SVG filter #lw-cast (js/lightroom.js), not from a multiply layer */
.lw-photo::after, .lw-cell u::after, .lw-one u::after { display: none; }
.lw-photo img, .lw-cell img, .lw-one img { filter: saturate(var(--s, 1)) brightness(calc(var(--b, 1) * (1 + .05 * (1 - var(--w, 1))))) url(#lw-cast); }

/* a vertical photo opened in the big view fills the height of the grey area, as Lightroom fits it */
.lw-photo.is-tall { left: calc(32 * var(--u)) !important; top: calc(30 * var(--u)) !important; width: calc(633.5 * var(--u)) !important; height: calc(580 * var(--u)) !important; }
