/* The opening shot. Loaded after paper.css, and once more inside the sheet's
   shadow root, for the copy of the first screen that is printed on the sheet. */
:root {--travel:calc(var(--u-svh,1svh) * 150)}
.mast {transition:transform .6s cubic-bezier(.2,.7,.2,1) .12s,opacity .4s .12s,color .18s,background-color .18s}
.mast.away {transform:translateY(-100%);opacity:0;transition-delay:0s}
.film {--lift:0;--cue-ink:1}
.enhanced .film {height:calc(calc(var(--u-svh,1svh) * 100) + var(--travel))}
.film .stage {background:#08090b;color:#e9ebe6}
.film h1 {position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* The camera move is a series of photographs of the desk, drawn into the two
   canvases; the sheet in them is blank. scene.js lays everything else on the
   sheet's four corners: .leaf, the page's own paper; .press, the print; .grain,
   which belongs to the photograph. --lift runs from 0, the photograph, to 1,
   the page, as the camera closes in: the page's paper comes up, the print
   turns from toner seen through a lens into the page's own ink, the grain goes. */
.shot,.grain {position:absolute;inset:0}
.shot {pointer-events:none;background:url(assets/desk-wide-00.webp) 51% 62%/cover;transition:opacity 1s}
@media (max-aspect-ratio:1/1) {.shot {background-image:url(assets/desk-tall-00.webp);background-position:50% 50%}}
.js .film:not(.live) .shot {opacity:0}
.live .shot {background:none}
.plate,.leaf,.rig,.live .grain {position:absolute;inset:0 auto auto 0;transform-origin:0 0;will-change:transform}
.press {position:absolute;inset:0}
.plate {display:none}
.live .plate {display:block}
.leaf {z-index:2;opacity:var(--lift)}
/* Toner on this paper in this light is a dark grey, about four tenths of the
   paper's brightness, and the lens softens it as it softens the paper: both
   measured on a still with the page really printed on the sheet
   (desk_render.py B). scene.js sets the blur. */
.press {--toner:.6;z-index:3;isolation:isolate;mix-blend-mode:multiply;opacity:calc(var(--toner) + (1 - var(--toner)) * var(--lift))}
/* The print is drawn several times over, each at one fixed size (--lod-x and
   --lod-y, from scene.js), so that small type and hairlines are drawn small,
   not shrunk from large. scene.js cross-fades the two nearest to the size it
   is seen at: their opacities add up to one, and plus-lighter adds them up. */
/* The transparent gradient on .rig is what keeps the text still. Without it the
   text flashed for single frames while the camera drifted: about five times a
   second at rest in a GPU Chromium, none with it (tools/scene_flicker.js). Why
   it helps is not established. will-change on .sheet stops the flashes too,
   but then the text is drawn coarsely. Measure again before changing this. */
.rig {opacity:0;will-change:transform,opacity;background:linear-gradient(#0000,#0000);width:calc(var(--page-w,100%) * var(--lod-x,1));height:calc(var(--rig-h,100%) * var(--lod-y,1))}
.rig+.rig {mix-blend-mode:plus-lighter}
.sheet {position:absolute;left:0;top:0;width:var(--page-w,100%);height:var(--rig-h,100%);color:var(--ink);transform-origin:0 0;transform:scale(var(--lod-x,1),var(--lod-y,1))}
/* (Wave I, item 15) The light under the mouse on the opening frame (scene.js clips it to the sheet). */
.glow {position:absolute;inset:0;z-index:5;pointer-events:none;opacity:0;transition:opacity .45s cubic-bezier(.2,.7,.2,1);
  background:radial-gradient(circle min(34vmin,320px) at var(--gx,50%) var(--gy,50%),#fff,#fff0);mix-blend-mode:soft-light}
.glow.on {opacity:.14}
@media (prefers-reduced-motion:reduce) {.glow {display:none}}
.grain {z-index:4;background:url(assets/grain.webp);mix-blend-mode:overlay;opacity:calc((1 - var(--lift)) * .3)}
@media (min-resolution:1.5dppx) {.grain {background-size:120px}}
.flat .plate,.flat .grain,.flat .cue {visibility:hidden}
.flat .press,.flat .rig {mix-blend-mode:normal}
.flat .rig {will-change:auto}

.cue {position:absolute;left:50%;bottom:clamp(10px,calc(var(--u-svh,1svh) * 3),30px);transform:translateX(-50%);display:inline-flex;align-items:center;min-height:36px;padding:0 12px;color:#e6eaee;font:11px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;text-decoration:none;opacity:calc(var(--cue-ink) * .9)}
.cue span {display:inline-flex;gap:10px}
.cue i {font-style:normal;color:var(--amber)}
.js .film:not(.live) .cue {visibility:hidden}
/* (Wave I, item 2) The cue comes up a little after the first frame (was 2.8 s), brighter at rest (was .72, #cfd5d9). */
.live .cue span {animation:cue-in .75s .55s cubic-bezier(.19,1,.22,1) backwards}
@keyframes cue-in {from {opacity:0}}
@media (prefers-reduced-motion:reduce) {.live .cue span {animation:none}}
@media (max-height:500px) and (max-width:820px) {.cue {display:none}}

/* The first screen of the page is the sheet, so on a wide screen it is one
   column down the middle of it, and on a larger window than it was drawn for
   (1440 by 900) it grows with the window: the sheet does. */
@media (min-width:821px) {
  .practice-grid {zoom:var(--fit,1)}
  .practice {align-content:start;padding:calc(var(--mast) + clamp(20px,calc(var(--u-svh,1svh) * 5.5),56px)) 0 clamp(28px,calc(var(--u-svh,1svh) * 6),65px)}
  .practice-grid {grid-template-columns:minmax(0,1fr);gap:clamp(20px,calc(var(--u-svh,1svh) * 3.8),40px);width:var(--col-w,80%)}
  .practice-intro {display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:clamp(28px,4.4vw,72px);align-items:end}
  .practice-intro .eyebrow {grid-column:1/-1;margin-bottom:clamp(8px,calc(var(--u-svh,1svh) * 1.6),16px)}
  .practice-intro h2 {grid-row:2/span 2;font-size:clamp(34px,min(4.2vw,calc(var(--u-svh,1svh) * 7.4)),64px);line-height:1.02}
  .practice-intro h2 br {display:none}
  .practice-intro h2 em::before {content:" "}
  .practice-intro>p:not(.eyebrow) {margin-top:0;max-width:40em;font-size:clamp(14px,min(1.1vw,calc(var(--u-svh,1svh) * 1.9)),16px)}
  .practice-index {margin-top:8px}
  .dg-q {font-size:clamp(22px,min(2.75vw,calc(var(--u-svh,1svh) * 4.7)),40px);line-height:1.42}
  .dg-body {padding-top:clamp(14px,calc(var(--u-svh,1svh) * 2.6),26px)}
  .dg-ladder {margin-top:clamp(14px,calc(var(--u-svh,1svh) * 2.6),24px)}
}

/* That screen has two states. As print it is the exam sheet: a letterhead,
   the tasks that follow the first, a footer, and nothing Russian. As page it is the site. The
   copy on the photographed sheet is print. The page itself turns from print to
   page when the camera lands, one part after the other. */
.extras {position:absolute;inset:0 0 auto;pointer-events:none;font-family:var(--mono);color:var(--ink);opacity:0;transition:opacity .38s}
.extras>* {position:absolute}
.practice-intro>*,.dg-timer,.dg-ladder,.dg-actions,.dg-fb,.dg-gloss,.dg-given,.dg-ru,.dg-result>* {transition:opacity .55s cubic-bezier(.2,.7,.2,1) var(--after,.3s),transform .7s cubic-bezier(.2,.7,.2,1) var(--after,.3s)}
.practice-intro .eyebrow {--after:.06s}
.practice-intro h2 {--after:.1s}
.practice-intro>p:not(.eyebrow) {--after:.18s}
.practice-index {--after:.24s}
.dg-ladder {--after:.34s}
.dg-actions {--after:.4s}
.dg-ans input::placeholder {transition:opacity .4s .34s}
.print .extras {opacity:1;transition-duration:.25s}
.print .practice-intro>*,.print .dg-timer,.print .dg-ladder,.print .dg-actions,.print .dg-fb,.print .dg-gloss,.print .dg-given,.print .dg-ru,.print .dg-result>* {opacity:0;transform:translateY(12px);transition-duration:.22s;transition-delay:0s}
.print .dg-ans input::placeholder {opacity:0;transition:opacity .2s}
.cut,.cut *,.cut ::placeholder {transition:none!important}

/* The letterhead leaves upward as the page's own heading comes up from below. */
.lh {transform-origin:0 100%;transform:translateY(-14px) scale(var(--lh-k,1));transition:transform .5s cubic-bezier(.4,0,.7,.4)}
.print .lh {transform:scale(var(--lh-k,1));transition:transform .25s}
.lh-meta,.lh-title,.foot {display:flex;justify-content:space-between;gap:16px}
/* --hair (lines across the sheet) and --hair-x (lines down it) keep the print's lines from vanishing while the sheet is far away. Both are 1 on the page itself. */
.dg {border-block-width:max(2px,1px * var(--hair,1))}
.dg-head {border-bottom-width:calc(1px * var(--hair,1))}
.dg-ans input {border-bottom-width:max(1.5px,1px * var(--hair,1))}
.lh-meta {align-items:baseline;padding-bottom:11px;border-bottom:calc(1px * var(--hair,1)) solid;font-size:13px;letter-spacing:.09em}
.lh-meta b {font-size:22px;letter-spacing:.07em}
.lh-title {align-items:flex-end;margin-top:15px}
.lh-title strong {display:block;font:400 clamp(42px,min(4.6vw,calc(var(--u-svh,1svh) * 8)),68px)/1 var(--serif);letter-spacing:-.05em}
.lh-title small {display:block;margin-top:9px;font-size:12px;letter-spacing:.07em;color:var(--muted)}
.lh-fields small {display:flex;justify-content:flex-end;align-items:flex-end;gap:10px;margin-top:14px}
.lh-fields i {width:150px;border-bottom:calc(1px * var(--hair,1)) solid}
.lh.compact .lh-title {display:none}
.lh.compact .lh-meta {border:0;padding:0}
.more {display:flex;flex-direction:column;gap:calc(36px * var(--fit,1))}
.more .dg {zoom:var(--fit,1)}
.more .dg-ans {margin-top:28px}
.more .dg-ans i {width:160px;height:42px;border-bottom:max(1.5px,1px * var(--hair,1)) solid}
.foot {align-items:baseline;padding-top:calc(11px * var(--fit,1));border-top:calc(1px * var(--hair,1)) solid var(--rule);font-size:calc(12px * var(--fit,1));letter-spacing:.07em;color:var(--muted)}
@media (max-width:820px) {
  .lh-meta {font-size:11px}
  .lh-meta b {font-size:15px}
  .lh-title strong {font-size:clamp(34px,10.5vw,46px)}
  .lh-title small {font-size:10px;margin-top:6px}
  .lh-fields small {margin-top:9px}
  .lh-fields i {width:74px}
  .foot {font-size:10px}
}
