/* case.css — Plate III media: the Bidsights viewer, the parse-first illustration, the redaction gag.
   Site tokens only. Flat inks. Machine = 1px lines, square corners, mono labels, cyan. Human = the ink bar.
   Actions are the site's .pill and the quiet .icon-btn (the replay); the segmented control below is the reference grammar for the others. */

/* ---------- Fig. 2 label (static markup: it heads the four stacked shots with no JS, and the stage with JS) ---------- */
.viewer-fig{margin:0 0 .9rem;color:var(--ink-2)}
.viewer-fig b{color:var(--ink);font-weight:500;margin-right:.7em}

/* ---------- viewer (JS): one stage, a caption, a contact sheet; all of it runs to the column edge ---------- */
/* All four shots sit in one grid cell, so the cell is as tall as the tallest caption and nothing below ever moves. */
.js .viewer.is-on .shots{display:grid;gap:0}
.js .viewer.is-on .shot{grid-area:1/1;min-width:0;opacity:0;visibility:hidden;transition:opacity .2s cubic-bezier(.2,.7,.2,1),visibility 0s .2s}
.js .viewer.is-on .shot.is-current{opacity:1;visibility:visible;transition-delay:0s}
.js .viewer.vt .shot{transition:none}
.js .viewer.vt .shots{view-transition-name:viewer-stage}
/* View Transitions: only the stage crossfades; the rest of the page must not blink or double its brightness */
html.case-vt::view-transition-old(root){display:none}
html.case-vt::view-transition-new(root){animation:none;mix-blend-mode:normal}
html.case-vt::view-transition-group(viewer-stage){animation-duration:.24s;animation-timing-function:cubic-bezier(.2,.7,.2,1)}

.shot-img{position:relative}
.shot-img img{display:block;width:100%;height:auto}

/* contact sheet: at rest each screen is the real screenshot under a paper wash; the current one is in full colour with the cyan frame */
.contact{display:flex;flex-wrap:wrap;align-items:flex-start;gap:16px clamp(12px,1.8vw,22px);margin-top:clamp(22px,2.8vw,34px);padding-top:clamp(14px,1.8vw,20px);border-top:1px solid var(--rule)}
.thumb{flex:0 1 clamp(150px,19vw,250px);min-width:0;margin:0;padding:0;border:0;background:none;color:var(--ink-2);font:inherit;text-align:left;cursor:pointer;display:flex;flex-direction:column;gap:.6rem;-webkit-tap-highlight-color:transparent}
.thumb-img{display:block;aspect-ratio:2000/1090;overflow:hidden;background:var(--paper);border:2px solid var(--rule);border-radius:10px;transition:border-color .2s}
.thumb-img img{display:block;width:100%;height:100%;object-fit:cover;opacity:.68;transition:opacity .2s}
.thumb-label{display:flex;gap:.8em;align-items:baseline;transition:color .2s}
.thumb-label i{font-style:normal;color:var(--ink-2)}
.thumb:focus-visible .thumb-img img{opacity:1}
@media (hover:hover){.thumb:hover .thumb-img{border-color:var(--rule-hard)}.thumb:hover .thumb-img img{opacity:1}.thumb:hover .thumb-label{color:var(--ink)}}
.thumb[aria-current="true"] .thumb-label{color:var(--ink)}
.thumb[aria-current="true"] .thumb-img{border-color:var(--mach)}
.thumb[aria-current="true"] .thumb-img img{opacity:1}
.thumb[aria-current="true"] .thumb-label i{color:var(--mach)}
.viewer-count{margin-left:auto;align-self:flex-end;color:var(--ink-2);font-variant-numeric:tabular-nums;padding-bottom:.1rem}
@media (max-width:560px){
  .contact{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 14px}
  .thumb{flex:none}
  .viewer-count{grid-column:1/-1;margin:0;text-align:right}
}

/* a small flourish, only with a fine pointer or when a thumbnail becomes current: the picture "develops" from a halftone screen.
   The end states are the plain image; where @property, masks or motion are missing there is no flourish at all. */
@property --r{syntax:"<length>";inherits:false;initial-value:6.4px}
@keyframes develop{from{--r:3.4px}to{--r:6.4px}}
@media (prefers-reduced-motion:no-preference){
  .js .viewer.halftone .thumb[aria-current="true"] img,.js .viewer.halftone .thumb:focus-visible img{--r:6.4px;-webkit-mask:radial-gradient(circle at 50% 50%,#000 var(--r),transparent calc(var(--r) + .7px)) 0 0/8px 8px;mask:radial-gradient(circle at 50% 50%,#000 var(--r),transparent calc(var(--r) + .7px)) 0 0/8px 8px;animation:develop .7s cubic-bezier(.2,.7,.2,1)}
}
@media (prefers-reduced-motion:no-preference) and (hover:hover){
  .js .viewer.halftone .thumb:hover img{--r:6.4px;-webkit-mask:radial-gradient(circle at 50% 50%,#000 var(--r),transparent calc(var(--r) + .7px)) 0 0/8px 8px;mask:radial-gradient(circle at 50% 50%,#000 var(--r),transparent calc(var(--r) + .7px)) 0 0/8px 8px;animation:develop .7s cubic-bezier(.2,.7,.2,1)}
}

/* ---------- the citation thread ---------- */
.cite-layer{position:absolute;inset:0;width:100%;height:100%;overflow:hidden}
.cite-layer .panel{fill:none;stroke:var(--mach);stroke-width:2px;vector-effect:non-scaling-stroke;opacity:0;transition:opacity .2s}
.cite-layer.is-on .panel{opacity:1;transition-delay:.45s}
.cite-layer .hot{cursor:pointer;outline:none;-webkit-tap-highlight-color:transparent}
.cite-layer .pad{fill:transparent;stroke:transparent;stroke-width:10px;vector-effect:non-scaling-stroke;pointer-events:all}
.cite-layer .box{fill:transparent;stroke:var(--mach);stroke-width:1px;stroke-opacity:.6;vector-effect:non-scaling-stroke;transition:fill .2s,stroke-opacity .2s}
.cite-layer .ring{fill:none;stroke:var(--mach);stroke-width:2px;vector-effect:non-scaling-stroke;opacity:0}
.cite-layer .hot.is-on .box{fill:rgba(29,95,208,.14);stroke-opacity:1;stroke-width:2px}
@media (hover:hover){.cite-layer .hot:hover .box{stroke-opacity:1;stroke-width:2px}}
.cite-layer .hot:focus-visible .ring{opacity:1}
.cite-layer .thread{opacity:0;transition:opacity .16s}
.cite-layer .thread.is-on{opacity:1}
.cite-layer .dots{fill:none;stroke:var(--mach);stroke-width:3px;stroke-linecap:round;stroke-dasharray:.01 9;vector-effect:non-scaling-stroke}
.cite-layer .land{fill:none;stroke:var(--mach);stroke-width:9px;stroke-linecap:round;vector-effect:non-scaling-stroke;opacity:0;transition:opacity .2s}
.cite-layer .thread.is-on .land{opacity:1;transition-delay:.55s}
.cite-layer .reveal{fill:none;stroke:#fff;stroke-width:80;stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset 0s .16s}
.cite-layer .thread.is-on .reveal{stroke-dashoffset:0;transition:stroke-dashoffset .7s cubic-bezier(.35,.55,.2,1)}
@media (pointer:coarse){.cite-layer .pad{stroke-width:44px}}
@media (prefers-reduced-motion:reduce){.cite-layer .panel,.cite-layer .land,.cite-layer .thread,.cite-layer .box,.cite-layer .reveal{transition:none!important}}

/* under the stage: caption on the left; the tools (thread label, "Trace a citation", "Open full size") on the right */
.thread-note{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem 1.2rem;margin-top:.8rem}
.js .viewer.is-on .shot figure{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);column-gap:clamp(20px,3vw,44px);align-items:start}
.js .viewer.is-on .shot-frame{grid-column:1/-1}
.js .viewer.is-on .shot figcaption{grid-column:1}
.js .viewer.is-on .thread-note{grid-column:2;margin-top:.7rem}
.thread-label{margin:0;flex:1 1 16rem;display:flex;align-items:center;gap:.9em;color:var(--ink-2);font:400 var(--mono-m)/1.5 var(--mono);letter-spacing:.02em;transition:color .2s}
.thread-label::before{content:"";flex:none;width:30px;height:6px;background:radial-gradient(circle,currentColor 1.6px,transparent 1.9px) 0 50%/8px 6px repeat-x;opacity:.7}
.thread-label.is-on{color:var(--mach)}
.thread-label.is-on::before{opacity:1}
.thread-label .said{display:none}
.thread-label.is-on .said{display:inline}
.thread-label.is-on .hint{display:none}
/* small or touch screens: one column. The resting hint goes (the button says it);
   the sentence returns when a thread is showing. */
@media (max-width:900px),(pointer:coarse){
  .thread-label{order:3;flex:1 1 100%}
  .thread-label:not(.is-on){display:none}
}
@media (max-width:900px){.js .viewer.is-on .shot figure{grid-template-columns:minmax(0,1fr)}.js .viewer.is-on .thread-note{grid-column:1;margin-top:.9rem}}

/* ---------- parse first: the list stays; the illustration and its switch join it ---------- */
.pf{margin:1.6rem 0 0}
.pf-ctl{display:flex;flex-wrap:wrap;align-items:center;gap:.8rem 1rem;margin-bottom:1.1rem}
/* the segmented grammar: a pill track, 1.5px ink, Archivo 13.5px 600, the chosen segment ink-filled; 40px (44 on touch) */
.pf-seg{display:inline-flex;border:1.5px solid var(--ink);border-radius:999px}
.pf-seg button{min-height:37px;padding:0 1.15em;border:0;border-radius:999px;background:transparent;color:var(--ink);font:600 .84375rem/1.15 var(--sans);letter-spacing:0;cursor:pointer;transition:background .16s,color .16s}
@media (hover:hover){.pf-seg button:hover{background:var(--paper-2)}.pf-seg button[aria-pressed="true"]:hover{background:var(--ink)}}
.pf-seg button[aria-pressed="true"]{background:var(--ink);color:var(--paper)}
@media (pointer:coarse){.pf-seg button{min-height:41px}}
@media (max-width:520px){.pf-seg{flex-direction:column;border-radius:22px;width:100%}.pf-seg button{min-height:44px}}

.pf-stage{overflow:hidden}
.pf-stage svg{display:block;max-width:none}
.pf svg text{font:400 var(--mono-s)/1 var(--mono);letter-spacing:.04em;fill:var(--ink-2)}
.pf svg .st{font-weight:500;fill:var(--ink)}
.pf svg .st.ai,.pf svg text.ai{fill:var(--mach)}
.pf svg .page{fill:var(--paper);stroke:var(--ink-2);stroke-width:1}
.pf svg .furn line,.pf svg .aline{stroke:var(--rule-hard);stroke-width:1;opacity:.55}
.pf svg .ring{fill:none;stroke:var(--mach);stroke-width:2px;transform-box:fill-box;transform-origin:center}
.pf svg .ring2{fill:none;stroke:var(--mach);stroke-width:1;opacity:.45}
.pf svg .chip rect{fill:var(--paper);stroke:var(--mach);stroke-width:1}
.pf svg .chip text{fill:var(--mach);letter-spacing:.02em}
.pf svg .skip-line line{stroke:var(--ink-2);stroke-width:1;stroke-dasharray:2 5}
/* without a parsing layer those stations are not there, and the list says so in words and colour (never by fading text) */
.pf[data-mode="on"] .off-only,.pf[data-mode="off"] .on-only,.pf[data-mode="off"] .furn{display:none}
.pf[data-mode="off"] .st.skip{text-decoration:line-through;text-decoration-thickness:1.5px}
.js [data-pf="off"] .step:nth-child(2) b,.js [data-pf="off"] .step:nth-child(3) b{color:var(--ink-2);text-decoration:line-through;text-decoration-thickness:1.5px}
/* two columns of stations: the list would repeat their headings, so it stays for assistive tech only */
.pf-g>.pipe{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

.pf-note{margin:.9rem 0 0;color:var(--ink-2)}
.pf-cap{margin:.5rem 0 0;max-width:44rem;color:var(--ink);font-size:1.0625rem;line-height:1.5}
@media print{.pf-ctl{display:none}}

/* ---------- redaction: the control being described ---------- */
/* The text is readable at all times except while the bars are deliberately down (about a second, then they lift). */
.redact-target{cursor:default}
.redact{background:linear-gradient(var(--ink),var(--ink)) 100% 0/0% 100% no-repeat;padding:0 .14em;margin:0 -.14em;-webkit-box-decoration-break:clone;box-decoration-break:clone;transition:background-size .3s cubic-bezier(.2,.7,.2,1)}
.redact-target.is-redacted .redact{background-position:0 0;background-size:100% 100%;transition-delay:calc(var(--i,0)*.2s)}
@media (prefers-reduced-motion:reduce){.redact,.redact-target.is-redacted .redact{transition:none}}
@media (forced-colors:active){.redact{background-image:linear-gradient(CanvasText,CanvasText)}}
@media (forced-colors:active){
  .cite-layer .box,.cite-layer .ring,.cite-layer .panel,.cite-layer .dots,.cite-layer .land{stroke:Highlight}
  .cite-layer .reveal{forced-color-adjust:none}
  .pf-seg{border-color:CanvasText}
  .pf-seg button[aria-pressed="true"]{background:Highlight;color:HighlightText;forced-color-adjust:none}
}
