/* Snapshot form + post-submit inspection dialog (PR4).
 * The dialog is native <dialog> (true modality: inert background, Esc,
 * focus containment). Metrology language only: uniform graticule, fiducial
 * corner brackets, crosshair, monospace readout. No camera vocabulary,
 * no rule-of-thirds, no shutter flash, no blur, no infinite loops.
 * All states are event-truthful; see snapshot.js. */

/* ---------- form card (dark identity: the form always lives on the vault;
   inputs are paper slots — the one place you write on the machine) ---------- */
.snapshot-form { max-width:440px; text-align:left; }
.snapshot-form.is-centered { margin-left:auto; margin-right:auto; }
.field { margin-bottom:16px; }
.field label { display:block; font-weight:600; font-size:.85rem; margin-bottom:6px; color:#fff; }
.field input {
  width:100%; min-height:48px; padding:11px 13px; border:1px solid transparent; border-radius:6px;
  background:var(--paper); color:var(--ink, #f5f5f5);
  caret-color:var(--accent-deep); /* the smallest "type here" signal (Linear pattern) */
}
.snapshot-form .btn { min-height:48px; }  /* 2.5.8 + platform 48px targets */
.field input:focus {
  outline:2px solid var(--accent-hot);
  outline-offset:2px;
  box-shadow:0 0 0 2px var(--ink-950);
}
.field .err { display:none; color:var(--err-dark); font-size:.8rem; margin-top:5px; }
.field.invalid .err { display:block; }
.field.invalid input { border-color:var(--err); } /* dark red edge on the paper slot */

.form-note { font-size:.68rem; letter-spacing:.1em; text-transform:uppercase; color:rgba(255,255,255,.62); margin-top:12px; }
/* delivery expectation under the email field (review fix: say what the address
   will receive before asking for it) */
.field .hint { font-size:.78rem; color:rgba(255,255,255,.62); margin-top:5px; }
.form-msg { font-size:.85rem; color:#4ade80; margin-top:10px; } /* ok-green lifted for dark (4.5:1+) */
/* informational (not success): the honest-stub notice redirects, it doesn't confirm */
.form-msg--info { color:#fff; }
.form-msg--info a { color:var(--accent-hot); }

/* ---------- intake panel + spotlight (v2) ----------
   The instrument's input slot. Research-tuned choreography on CTA click:
   synchronous field focus (iOS keyboard chain) -> smooth scroll ->
   scrollend + 120ms fixation dwell -> scrim demotes the world (luminance
   contrast is the dominant saliency channel) while the panel lifts as the
   one lit plane -> brackets converge 28px with a mechanical settle
   (motion ONSET + translation are the two evidenced capture triggers;
   6px was below peripheral detectability). One pass, user-triggered,
   non-modal, dismissed by first input/scroll/Esc/click-away/timeout. */
.intake-panel { position:relative; max-width:480px; padding:20px 18px 16px; border:1px solid rgba(255,255,255,.14); border-radius:10px; background:rgba(255,255,255,.03);
  transition:background 200ms var(--ease-standard), border-color 200ms var(--ease-standard), box-shadow 200ms var(--ease-standard); }
.intake-panel--center { margin-left:auto; margin-right:auto; }
.intake-panel .ibr { position:absolute; width:18px; height:18px; border:1.5px solid rgba(255,255,255,.35); transition:border-color 150ms var(--ease-standard); pointer-events:none; }
.intake-panel .ibr.tl { top:-1px; left:-1px; border-right:0; border-bottom:0; --ox:-28px; --oy:-28px; }
.intake-panel .ibr.tr { top:-1px; right:-1px; border-left:0; border-bottom:0; --ox:28px; --oy:-28px; }
.intake-panel .ibr.bl { bottom:-1px; left:-1px; border-right:0; border-top:0; --ox:-28px; --oy:28px; }
.intake-panel .ibr.br { bottom:-1px; right:-1px; border-left:0; border-top:0; --ox:28px; --oy:28px; }
.intake-panel.armed .ibr { border-color:var(--accent-hot); border-width:2px; }

/* spotlight scrim: non-modal, pointer-events none (structurally cannot
   trap), dims + de-reads the surround; the panel lifts above it */
.intake-scrim { position:fixed; inset:0; z-index:30; background:rgba(8,9,8,.62);
  -webkit-backdrop-filter:blur(3px) saturate(.65); backdrop-filter:blur(3px) saturate(.65);
  opacity:0; transition:opacity 220ms var(--ease-enter); pointer-events:none; }
.intake-scrim.on { opacity:1; }
/* the lit island: luminance lift + functional amber focus halo (state
   indicator, same exemption class as focus rings) */
.intake-panel.lit {
  z-index:31;
  background:rgba(255,255,255,.07);
  border-color:var(--signal-edge);
  /* amber keyline, vault gap, neutral hard outer edge. No blur or bloom. */
  box-shadow:0 0 0 2px var(--ink-950), 0 0 0 3px var(--hairline-3), var(--signal-step-dark);
}

/* load sweep (owner request): the same convergence fires once as the hero
   finishes building. No scrim, no focus steal, and it ends at the idle
   color so amber stays reserved for armed/spotlight states. */
@media (prefers-reduced-motion: no-preference) {
  .intake-panel.sweep:not(.armed) .ibr { animation:ibr-sweep 520ms cubic-bezier(0,0,.38,.9) both; }
}
@keyframes ibr-sweep {
  0%   { opacity:0; transform:translate(var(--ox), var(--oy)); border-color:#3a4656; }
  60%  { opacity:1; border-color:var(--accent-hot); }
  100% { opacity:1; transform:none; border-color:rgba(255,255,255,.35); }
}

/* the lock: onset (0-90ms) -> converge (90-370ms, Carbon
   entrance-productive) -> settle with <=2px single-pass overshoot +
   brightness tick (370-450ms). Dim gray -> amber = simultaneous
   luminance + chroma jump for peripheral detection. */
@media (prefers-reduced-motion: no-preference) {
  .intake-panel.locking .ibr { animation:ibr-lock 460ms cubic-bezier(0,0,.38,.9) both; }
}
@keyframes ibr-lock {
  0%    { opacity:0;   transform:translate(var(--ox), var(--oy)); border-color:#3a4656; border-width:1.5px; }
  19.5% { opacity:.85; transform:translate(var(--ox), var(--oy)); border-color:#3a4656; }
  80%   { opacity:1;   transform:translate(calc(var(--ox) / -14), calc(var(--oy) / -14)); border-color:var(--accent); border-width:2px; }
  90%   { border-color:#f6bc79; } /* brightness tick overshoots the settle value */
  100%  { opacity:1;   transform:none; border-color:var(--accent-hot); border-width:2px; }
}

/* ---------- inspection dialog ---------- */
.inspect-dialog {
  position:fixed; inset:0; margin:auto; padding:0; border:1px solid rgba(255,255,255,.2); border-radius:2px; background:rgb(5,6,5); color:#f5f5f5;
  max-width:560px; width:calc(100vw - 48px);
}
.inspect-dialog::backdrop { background:rgba(0,0,0,.72); }
.ins-inner { padding:30px 30px 24px; position:relative; }
.ins-close {
  position:absolute; top:14px; right:14px; width:34px; height:34px; border-radius:2px;
  border:1px solid rgba(255,255,255,.13); background:transparent; cursor:pointer; font-size:1rem; color:#a3a3a3;
}
.ins-close:hover { border-color:#a3a3a3; }

.ins-head { display:flex; align-items:center; gap:8px; font-family:var(--font-mono, monospace); font-size:11.5px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; color:#a3a3a3; margin-bottom:14px; padding-right:44px; }
.ins-head svg { width:12px; height:12px; flex:none; }
.ins-domain { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ins-demo { font-family:var(--font-mono, monospace); font-size:11.5px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; border:1px solid rgba(255,255,255,.24); border-radius:99px; padding:2px 8px; color:#a3a3a3; flex:none; }

/* the status IS the content; it precedes the frame in DOM and on screen.
   Long domains and API detail strings must wrap, never overflow (reflow). */
.ins-status { font-family:var(--font-body); font-weight:600; font-size:16px; line-height:1.2; margin:0 0 8px; overflow-wrap:anywhere; }
.ins-status:focus-visible { outline:2px solid var(--accent-hot); outline-offset:4px; border-radius:2px; }
.ins-sub { font-size:15px; color:var(--muted); min-height:1.4em; margin:0 0 18px; line-height:1.5; overflow-wrap:anywhere; }

/* inspection frame: skeleton page under a uniform graticule with fiducial
   brackets and a crosshair. Quarters grid, deliberately NOT rule-of-thirds. */
.ins-frame { position:relative; height:170px; border:1px solid rgba(255,255,255,.13); border-radius:2px; overflow:hidden; background:#000; }
.ins-page { position:absolute; inset:14px 14px 30px; display:grid; gap:9px; align-content:start; }
.ins-page .sk { display:block; background:rgba(255,255,255,.09); border-radius:2px; }
.ins-page .r1 { height:10px; width:40%; background:rgba(255,255,255,.16); }
.ins-page .r2 { height:34px; }
.ins-page .r3 { height:9px; width:75%; }
.ins-page .r4 { height:9px; width:55%; }
.ins-grid { position:absolute; inset:0; pointer-events:none; opacity:.55; }
.ins-grid .gv { position:absolute; top:0; bottom:0; width:1px; background:rgba(255,255,255,.08); }
.ins-grid .gh { position:absolute; left:0; right:0; height:1px; background:rgba(255,255,255,.08); }
.ins-grid .br { position:absolute; width:14px; height:14px; border:1.5px solid rgba(255,255,255,.35); }
.ins-grid .br.tl { top:7px; left:7px; border-right:0; border-bottom:0; }
.ins-grid .br.tr { top:7px; right:7px; border-left:0; border-bottom:0; }
.ins-grid .br.bl { bottom:7px; left:7px; border-right:0; border-top:0; }
.ins-grid .br.br2 { bottom:7px; right:7px; border-left:0; border-top:0; }
.ins-cross { position:absolute; top:50%; left:50%; width:14px; height:14px; margin:-7px 0 0 -7px; }
.ins-cross::before, .ins-cross::after { content:""; position:absolute; background:rgba(255,255,255,.35); }
.ins-cross::before { left:50%; top:0; bottom:0; width:1px; margin-left:-.5px; }
.ins-cross::after { top:50%; left:0; right:0; height:1px; margin-top:-.5px; }
.ins-readout { position:absolute; left:14px; right:14px; bottom:8px; margin:0; font-family:var(--font-mono, monospace); font-size:11.5px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* lock beat: <=700ms, opacity + <=4px transform only, runs once, settles */
@media (prefers-reduced-motion: no-preference) {
  .inspect-dialog.locking .ins-grid { animation:ins-lock 700ms var(--ease-settle) both; }
  .inspect-dialog.locking .ins-grid .br { animation:ins-br 500ms var(--ease-settle) both; }
}
@keyframes ins-lock { 0% { opacity:0; } 55% { opacity:1; } 100% { opacity:.55; } }
@keyframes ins-br { from { opacity:0; transform:translateY(3px); } to { opacity:1; transform:none; } }

/* optional live-status rail: rows change ONLY on observed backend states */
.ins-watch { margin-top:16px; border-top:1px solid rgba(255,255,255,.13); padding-top:12px; }
.ins-watch summary { cursor:pointer; font-size:15px; font-weight:600; }
.inspect-dialog .ins-watch summary:hover { color:#fff; } /* (0,3,1): must outrank the r121 (0,2,1) ink override below */
.ins-rail { margin-top:6px; }
.ins-rail .stage { display:flex; gap:12px; align-items:center; padding:9px 2px; border-bottom:1px solid rgba(255,255,255,.13); font-size:15px; }
.ins-rail .stage:last-child { border-bottom:none; }
.ins-rail .mark { width:20px; height:20px; border-radius:50%; border:2px solid rgba(255,255,255,.13); flex:none; display:flex; align-items:center; justify-content:center; font-size:.72rem; font-weight:700; color:transparent; }
.ins-rail .stage.active .mark { border-color:var(--accent-hot); }
.ins-rail .stage.active .mark::before { content:""; width:7px; height:7px; border-radius:50%; background:var(--accent-hot); }
.ins-rail .stage.done .mark { background:transparent; border-color:rgba(255,255,255,.35); color:#f5f5f5; }
.ins-rail .lbl-text { color:#8a8a8a; }
.ins-rail .stage.active .lbl-text, .ins-rail .stage.done .lbl-text { color:#f5f5f5; }
.ins-rail .stage.active .lbl-text {
  display:inline-flex;
  padding:3px 7px;
  border:1px solid rgba(255,255,255,.24);
  border-width:1px 2px 2px 1px;
  border-right-color:rgba(255,255,255,.13);
  border-bottom-color:rgba(255,255,255,.13);
  border-radius:2px;
  box-shadow:var(--signal-step-dark);
}
/* Demo progression is explicitly simulated, so it retains the geometry but
   not the amber live-state semantics. */
.inspect-dialog--demo .ins-rail .stage.active .mark { border-color:#a3a3a3; }
.inspect-dialog--demo .ins-rail .stage.active .mark::before { background:#a3a3a3; }
.inspect-dialog--demo .ins-rail .stage.active .lbl-text {
  border-color:rgba(255,255,255,.24);
  border-right-color:rgba(255,255,255,.13);
  border-bottom-color:rgba(255,255,255,.13);
  box-shadow:var(--signal-step-dark);
}

@media (forced-colors:active) {
  .field input:focus,
  .ins-status:focus-visible {
    outline:2px solid Highlight;
    outline-offset:2px;
    box-shadow:none !important;
  }
  .ins-rail .stage.active .lbl-text { border:2px solid Highlight; }
}

.ins-actions { margin-top:18px; display:flex; justify-content:flex-end; }

@media (max-width:560px) {
  .inspect-dialog { width:calc(100vw - 24px); }
  .ins-inner { padding:22px 20px 20px; }
  .ins-frame { height:120px; }   /* status first, frame condensed: outcome fits without internal scroll */
}

/* ---------- r121 REG-2 dark instrument skin: scoped overrides ----------
   (D) amber is TRANSIENT on the dialog reticle - the 700ms lock beat only
   (r114 precedent); idle brackets/crosshair are neutral hairlines. */
.inspect-dialog.locking .ins-grid .br { border-color:var(--accent-hot); }
.inspect-dialog.locking .ins-cross::before, .inspect-dialog.locking .ins-cross::after { background:var(--accent-hot); }

/* Ink overrides at (0,2,0): base.css's paper-family selectors (114/116/125)
   still name .inspect-dialog; these outrank them everywhere without
   churning base.css (corrected-proposal option E, overrides variant).
   Contrasts on rgb(5,6,5): #f5f5f5 18.6:1, #a3a3a3 8.0:1, #8a8a8a 5.9:1. */
.inspect-dialog .ins-status { color:#f5f5f5; }
.inspect-dialog .ins-head, .inspect-dialog .ins-sub, .inspect-dialog .ins-readout, .inspect-dialog .ins-demo { color:#a3a3a3; }
.inspect-dialog .ins-watch summary { color:#f5f5f5; }
.inspect-dialog .ins-close { color:#a3a3a3; }

/* (F) the one .btn the r118 sweep can never see (dialog is built lazily):
   premium-foundation's pf-radius rule is (0,3,1) on landing (its :is()
   carries a two-class argument), so the pin doubles the dialog class to
   (0,4,0) - the s4 idiom - to win everywhere. */
.inspect-dialog.inspect-dialog .ins-actions .btn { border-radius:2px; }

/* r122 PSY-2: the demo end state gains the real-artifact act. Dark-grammar
   link: the corrected proposal chose accent-deep FOR PAPER; on rgb(5,6,5)
   that ink fails contrast and re-imports the retired second amber family,
   so the link is re-derived to the dark register (#f5f5f5 18.6:1, hover
   #fff, focus ring amber = the census-exempt house grammar). The [hidden]
   display rule is load-bearing: the author display rule above otherwise
   defeats the hidden attribute. margin-right:auto splits the actions row
   (link left, Close right) without touching its flex-end justification. */
.ins-open-real { display:inline-flex; align-items:center; min-height:48px; margin-right:auto; color:#f5f5f5; font-weight:600; font-size:15px; line-height:1.35; text-decoration:underline; text-underline-offset:4px; }
.ins-open-real:hover { color:#fff; }
.ins-open-real:focus-visible { color:#fff; outline:2px solid var(--accent-hot); outline-offset:2px; }
.ins-open-real[hidden] { display:none; }
