/* ==========================================================================
   exp35 . section stylesheet owned by the evidence builder.
   Scope: :is(#evidence, .ev-embed) only — #evidence is the landing section on
   index.html; .ev-embed wraps the chain and register blocks that moved to
   public-proof.html (exp38 stage 5, founder ruling 2026-08-25). The :is()
   keeps the original id-level specificity, so index renders byte-identically.
   Loaded AFTER assets/evidence.css and assets/exp33.css,
   so every rule here is a deliberate override or a new component.

   Contract:
     - tokens only, no colour literals, so all themes follow;
     - state colour is semantic:
         verified / passing            var(--pass)
         violated / failing            var(--fail)
         structural, or stated but not
         yet proven                    var(--unknown, var(--muted))
       var(--signal) is NEVER used for a state in this section. It stays an
       affordance (the kicker square, link hover) and nothing else;
     - motion reuses the shell's arrival system: site.js adds .in to .fig and
       to [data-reveal]; strokes are pathLength="1" + .dr with --d / --dur,
       text is .fx with --td. No script of its own.
   New classes are all .rx-* so they can never collide with .ev-* upstream.
   ========================================================================== */

/* ---------- head ---------------------------------------------------------
   The repository line is a citation, not a boast: the name, nothing else.
   Star counts and install counts are vanity numbers and stay off the page. */
:is(#evidence, .ev-embed) .rx-repo{margin-top:0;}

/* The publication sentence is the strongest trust move in the section, so it
   is set above lead weight and given its own rule. It is never a caption. */
:is(#evidence, .ev-embed) .rx-publish{
  margin:clamp(1.2rem,2vw,1.6rem) 0 0;
  padding-left:clamp(.8rem,1.4vw,1.1rem);
  border-left:2px solid var(--hair-strong);
  max-width:46ch;
  font-family:var(--prose);font-weight:600;
  font-size:clamp(1.18rem,1.9vw,1.5rem);line-height:1.45;letter-spacing:-.02em;
  color:var(--ink);text-wrap:pretty;
}
html[data-theme="riso"] :is(#evidence, .ev-embed) .rx-publish,
html[data-theme="brutal"] :is(#evidence, .ev-embed) .rx-publish{font-family:"Bricolage Grotesque",var(--sans);font-weight:700;}
html[data-theme="brutal"] :is(#evidence, .ev-embed) .rx-publish{border-left-width:4px;border-left-color:var(--ink);}

/* ---------- the three numbers -------------------------------------------
   Upstream evidence.css frames these in a ruled band with vertical dividers.
   That reads as a SaaS stats bar. Here they are large and quiet: no band, no
   dividers, lowercase mono labels, and they sit above the register they
   summarize rather than standing in for it. The per-theme colour treatment in
   evidence.css is left untouched on purpose. */
:is(#evidence, .ev-embed) .ev-nums{
  border:0;
  margin:clamp(2.2rem,4.2vw,3.4rem) 0 0;
  gap:clamp(1.8rem,3vw,2.4rem) clamp(2rem,5vw,5.5rem);
}
:is(#evidence, .ev-embed) .ev-cell{padding:0;}
:is(#evidence, .ev-embed) .ev-cell + .ev-cell{border:0;padding-left:0;}
:is(#evidence, .ev-embed) .ev-num{
  font-size:clamp(3.8rem,7.6vw,6.8rem);
  font-weight:500;line-height:.88;letter-spacing:-.045em;
}
:is(#evidence, .ev-embed) .ev-num-lab{
  margin-top:clamp(.7rem,1.2vw,1rem);max-width:26ch;
  font-size:.8rem;letter-spacing:.03em;text-transform:none;
}

/* ---------- a small mono label that titles one artifact ------------------ */
:is(#evidence, .ev-embed) .rx-tag{
  display:flex;align-items:center;gap:.55em;
  margin:clamp(2.6rem,5vw,4rem) 0 .9rem;max-width:740px;
  font-family:var(--mono);font-size:.72rem;font-weight:500;
  letter-spacing:.09em;text-transform:uppercase;color:var(--muted);
}
:is(#evidence, .ev-embed) .rx-tag.is-wide{max-width:none;}
:is(#evidence, .ev-embed) .rx-tag::after{content:"";flex:1 1 auto;height:1px;background:var(--hair);}

/* ==========================================================================
   THE RECEIPT
   One finding travelling requirement -> defect -> reproducer -> affected
   revision -> fix -> new evidence -> re-approved requirement. The arrows are
   the ink: they draw once, top to bottom, on arrival.
   ========================================================================== */
:is(#evidence, .ev-embed) .rx-fig{margin:0;}
:is(#evidence, .ev-embed) .rx-chain{max-width:740px;}

:is(#evidence, .ev-embed) .rx-step{
  display:grid;
  grid-template-columns:minmax(0,13rem) minmax(0,1fr);
  gap:.3rem clamp(1rem,2.4vw,1.9rem);
  align-items:baseline;
  padding:.8rem clamp(.9rem,1.8vw,1.15rem) .85rem;
  border:1px solid var(--hair);border-radius:var(--radius);
}
:is(#evidence, .ev-embed) .rx-step.is-end{border-color:var(--hair-strong);}

:is(#evidence, .ev-embed) .rx-stage{
  margin:0;display:flex;align-items:baseline;gap:.6rem;
  font-family:var(--mono);font-size:.72rem;font-weight:500;line-height:1.5;
  letter-spacing:.09em;text-transform:uppercase;color:var(--muted);
}
:is(#evidence, .ev-embed) .rx-n{
  flex:0 0 auto;color:var(--ink-40,var(--muted));
  font-variant-numeric:tabular-nums;letter-spacing:.04em;
}

:is(#evidence, .ev-embed) .rx-rec{min-width:0;}
:is(#evidence, .ev-embed) .rx-meta{
  margin:0 0 .3rem;display:flex;flex-wrap:wrap;align-items:baseline;gap:.35rem .9rem;
  font-family:var(--mono);font-size:.76rem;font-weight:500;line-height:1.5;
  letter-spacing:.02em;color:var(--ink);
}
:is(#evidence, .ev-embed) .rx-idc{color:var(--ink);}
/* a location or a file range is a field, not a state: no semantic square */
:is(#evidence, .ev-embed) .rx-field{color:var(--muted);}

/* the state chip: a semantic square, then the word */
:is(#evidence, .ev-embed) .rx-st{display:inline-flex;align-items:baseline;gap:.45em;}
:is(#evidence, .ev-embed) .rx-st::before{
  content:"";flex:0 0 auto;width:6px;height:6px;
  background:currentColor;transform:translateY(-1px);
}
:is(#evidence, .ev-embed) .rx-st.is-pass{color:var(--pass);}
:is(#evidence, .ev-embed) .rx-st.is-fail{color:var(--fail);}
:is(#evidence, .ev-embed) .rx-st.is-idle{color:var(--unknown,var(--muted));}
/* the closing step carries a drawn tick instead of the square */
:is(#evidence, .ev-embed) .rx-st-ck::before{display:none;}
:is(#evidence, .ev-embed) .rx-ck{width:14px;height:14px;flex:0 0 auto;transform:translateY(2px);}
:is(#evidence, .ev-embed) .rx-ck path{fill:none;stroke:var(--pass);stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round;}

:is(#evidence, .ev-embed) .rx-txt{
  margin:0;max-width:54ch;
  font-family:var(--prose);font-size:1.05rem;line-height:1.6;color:var(--ink);
}
:is(#evidence, .ev-embed) .rx-txt code{font-family:var(--mono);font-size:.93em;}

/* the connector. .fig svg is 100%-wide by default; these are glyphs, not
   diagrams, so they take a fixed box and sit under the stage column. */
:is(#evidence, .ev-embed) .rx-arrow{
  display:block;width:16px;height:34px;
  margin:0 0 0 clamp(.9rem,1.8vw,1.15rem);
}
:is(#evidence, .ev-embed) .rx-arrow .st{stroke:var(--unknown,var(--muted));stroke-width:1.2;}

:is(#evidence, .ev-embed) .rx-fig .fig-cap{margin-top:1.1rem;}

/* ---------- the register ------------------------------------------------- */
:is(#evidence, .ev-embed) .rx-flag{
  margin-left:.75rem;white-space:nowrap;
  font-family:var(--mono);font-size:.66rem;font-weight:500;
  letter-spacing:.08em;text-transform:uppercase;color:var(--unknown,var(--muted));
}
:is(#evidence, .ev-embed) .ev-row.is-shown .ev-id{color:var(--ink);}

/* ---------- the three actions -------------------------------------------- */
:is(#evidence, .ev-embed) .rx-links{gap:.9rem 2.1rem;}

/* ==========================================================================
   EVIDENCE INTEGRITY: the route to the artifact
   Plan §9 rule 4 - "verified" never appears without a route to the evidence.
   Every step of the receipt and every row of the register names a file in the
   public repository and links to it. These links are the only place --signal
   is allowed in this section: a link is an affordance, never a state.
   ========================================================================== */

/* the artifact line under a record: mono, quiet, one file per step */
:is(#evidence, .ev-embed) .rx-art{
  margin:.5rem 0 0;max-width:none;
  font-family:var(--mono);font-size:.72rem;line-height:1.6;
  letter-spacing:.01em;color:var(--muted);
  overflow-wrap:anywhere;
}
:is(#evidence, .ev-embed) .rx-art a,
:is(#evidence, .ev-embed) .rx-src a,
:is(#evidence, .ev-embed) .rx-nums-note a,
:is(#evidence, .ev-embed) .ev-cap a{
  color:var(--signal);text-decoration:none;
  border-bottom:1px solid rgba(var(--signal-rgb),.35);
}
:is(#evidence, .ev-embed) .rx-art a:hover,
:is(#evidence, .ev-embed) .rx-src a:hover,
:is(#evidence, .ev-embed) .rx-nums-note a:hover,
:is(#evidence, .ev-embed) .ev-cap a:hover{border-bottom-color:var(--signal);}
:is(#evidence, .ev-embed) .rx-dim{color:var(--unknown,var(--muted));padding:0 .15em;}

/* the repository line in the head is now the door it always claimed to be */
:is(#evidence, .ev-embed) a.ev-repo{text-decoration:none;}
:is(#evidence, .ev-embed) a.ev-repo:hover{color:var(--signal);border-bottom-color:var(--signal);}

/* the counts note. The house convention for anything the page cannot prove
   (audit.html: "Example, hand drawn" / "Counts are illustrative") is a visible
   caption, not a source comment. 123 is checkable in specs/; the other two are
   the campaign's tally and say so here, in the rendered page. */
:is(#evidence, .ev-embed) .rx-nums-note{
  margin:clamp(1rem,1.8vw,1.4rem) 0 0;max-width:70ch;
  font-family:var(--mono);font-size:.74rem;line-height:1.7;color:var(--muted);
  text-wrap:pretty;
}

/* 7 bugs / 4 records. Plan §9 rule 5: never print two counts a reader cannot
   line up. The relationship is a sentence a human reads, so it is set in the
   prose face at body weight, directly under the register heading and above the
   rows it explains. It is not a caption and it is not fine print. */
:is(#evidence, .ev-embed) .rx-reconcile{
  margin:0;max-width:62ch;
  font-family:var(--prose);font-size:1.05rem;line-height:1.6;color:var(--ink);
  text-wrap:pretty;
}
:is(#evidence, .ev-embed) .rx-reconcile + .ev-table{margin-top:clamp(1.5rem,2.8vw,2.2rem);}

/* register rows: the promise, then the record it came from */
:is(#evidence, .ev-embed) .rx-cell{min-width:0;}
:is(#evidence, .ev-embed) .rx-src{
  margin:.4rem 0 0;
  font-family:var(--mono);font-size:.7rem;line-height:1.5;
  letter-spacing:.02em;color:var(--muted);
}
:is(#evidence, .ev-embed) .ev-cap{max-width:78ch;}
:is(#evidence, .ev-embed) .ev-cap code{font-family:var(--mono);font-size:.96em;color:var(--ink);}

/* the miss keeps its own route out */
:is(#evidence, .ev-embed) .ev-miss-l{margin:1rem 0 0;}

/* ==========================================================================
   responsive
   ========================================================================== */
@media (max-width:760px){
  :is(#evidence, .ev-embed) .rx-step{grid-template-columns:minmax(0,1fr);gap:.5rem 0;}
  :is(#evidence, .ev-embed) .rx-txt{max-width:none;}
}
/* upstream evidence.css re-lays the register with grid-template-areas below
   700px; the promise is now wrapped so the wrapper takes the area. */
@media (max-width:700px){
  :is(#evidence, .ev-embed) .rx-cell{grid-area:promise;}
  :is(#evidence, .ev-embed) .rx-nums-note{max-width:none;}
  :is(#evidence, .ev-embed) .rx-reconcile{max-width:none;}
  :is(#evidence, .ev-embed) .ev-cap{max-width:none;}
}
@media (max-width:640px){
  :is(#evidence, .ev-embed) .ev-nums{grid-template-columns:minmax(0,1fr);}
  :is(#evidence, .ev-embed) .rx-tag{max-width:none;}
  :is(#evidence, .ev-embed) .ev-num{font-size:clamp(3.4rem,16vw,4.6rem);}
  :is(#evidence, .ev-embed) .ev-num-lab{max-width:none;}
  :is(#evidence, .ev-embed) .rx-publish{max-width:none;}
  :is(#evidence, .ev-embed) .rx-chain{max-width:none;}
}

/* ==========================================================================
   theme corrections
   ========================================================================== */
/* terminal draws line-work in low-alpha green; a 1px --hair plate dissolves. */
html[data-theme="terminal"] :is(#evidence, .ev-embed) .rx-step{border-color:var(--hair-strong);}
html[data-theme="terminal"] :is(#evidence, .ev-embed) .rx-tag::after{background:var(--hair-strong);}
html[data-theme="terminal"] :is(#evidence, .ev-embed) .rx-publish{border-left-color:var(--hair-strong);}

/* brutal: hairlines vanish next to the theme's plates. */
html[data-theme="brutal"] :is(#evidence, .ev-embed) .rx-step{border-width:2px;border-color:var(--ink);}
html[data-theme="brutal"] :is(#evidence, .ev-embed) .rx-arrow .st{stroke:var(--ink);stroke-width:1.8;}

/* riso and acid run hot grounds; keep the plate edge readable. */
html[data-theme="riso"] :is(#evidence, .ev-embed) .rx-step,
html[data-theme="acid"] :is(#evidence, .ev-embed) .rx-step{border-color:var(--hair-strong);}

/* ==========================================================================
   reduced motion: the chain holds one legible frame, fully drawn.
   ========================================================================== */
@media (prefers-reduced-motion:reduce){
  :is(#evidence, .ev-embed) .rx-arrow .dr,:is(#evidence, .ev-embed) .rx-ck .dr{
    stroke-dasharray:none !important;stroke-dashoffset:0 !important;transition:none !important;
  }
  :is(#evidence, .ev-embed) .fx{opacity:1 !important;transition:none !important;}
}

/* the 7-vs-4 bridge: the one phrase in the caption that must be read */
.ev-cap-em{font-weight:600;color:var(--ink,inherit);}

/* plan §4.1: the shortened "file tree in your repo" line at the close. */
.cl-tree{font-family:var(--mono);font-size:.92rem;letter-spacing:.01em;
  color:var(--label-text);margin:0 0 .9rem;
  overflow-wrap:anywhere;text-wrap:pretty;max-width:100%;}
@media (max-width:520px){ .cl-tree{font-size:.8rem;letter-spacing:0;} }

/* The closing CTA label grew when prove.html became an application rather than
   a paste-and-run ("Apply for an open-source audit"). The shared .btn is
   white-space:nowrap, so at 390 it pushed the document 17px sideways. Scoped
   to this one control: the shared button keeps its nowrap everywhere else. */
.cl-cta .btn{white-space:normal;text-wrap:balance;max-width:100%;}
@media (max-width:430px){ .cl-cta .btn{font-size:.94em;padding-left:1rem;padding-right:1rem;} }

/* The landing routes readers to the live portal; that portal is the seeded branch. */
.ev-branchnote{margin:.6rem 0 1.1rem;font-size:.84rem;line-height:1.55;
  color:var(--label-text);max-width:64ch;}

/* exp38: the mid-page ask. One quiet ruled line closing #evidence, so a
   reader convinced by the chain has a door here instead of three screens
   later. Prose voice for the sentence, the shell's own .cta-quiet for the
   action; a hairline rule, never a box. Colour comes only from shell tokens. */
:is(#evidence, .ev-embed) .ev-mid-ask{
  margin:clamp(2.2rem,3.5vw,3rem) 0 0;padding-top:1.5rem;
  border-top:1px solid var(--hair);
  font-family:var(--prose);font-size:1.08rem;line-height:1.6;
  color:var(--ink-60);max-width:66ch;
}
:is(#evidence, .ev-embed) .ev-mid-ask .cta-quiet{margin-left:.9rem;white-space:nowrap;}
@media (max-width:520px){
  :is(#evidence, .ev-embed) .ev-mid-ask .cta-quiet{margin-left:0;display:inline-block;margin-top:.35rem;}
}

/* ==========================================================================
   exp38 stage 5 — .ev-embed mounts on public-proof.html.
   The register figure (.ev-ledger) relied on s37-a11y.css §4 for its 4-up
   layout, and s37-a11y.css is loaded by index.html only. The block below
   restates those rules for both mounts so the moved register renders as it
   did on the landing. Keep in sync with s37-a11y.css §4; the 12px floors it
   also carried are already held page-wide by s35-craft.css !important rules,
   which public-proof.html loads.
   ========================================================================== */
:is(#evidence, .ev-embed) .ev-ledger { margin-top: clamp(1.4rem, 2.6vw, 2rem); }
:is(#evidence, .ev-embed) .ev-ledger .ev-nums {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.2rem, 2vw, 1.6rem) clamp(1.4rem, 2.6vw, 2.4rem);
  border: 0;
  margin: 0;
}
:is(#evidence, .ev-embed) .ev-ledger .ev-cell { padding: 0; }
:is(#evidence, .ev-embed) .ev-ledger .ev-num {
  font-size: clamp(2.4rem, 4.8vw, 3.6rem);
}
@media (max-width: 900px) {
  :is(#evidence, .ev-embed) .ev-ledger .ev-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  /* outlasts the 1-column override for :is(#evidence, .ev-embed) .ev-nums */
  :is(#evidence, .ev-embed) .ev-ledger .ev-nums {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem 1.2rem;
  }
  :is(#evidence, .ev-embed) .ev-ledger .ev-num { font-size: clamp(2.1rem, 8.5vw, 2.7rem); }
}
