/* ==========================================================================
   exp32 . evidence + closing sections
   Owned by the evidence builder. Load AFTER site.css and themes.css.
   Two blocks:  .ev-*  = the public receipt (section 2, right under the hero)
                .cl-*  = the final receipt + closing CTA (last section)
   Tokens only. No colour literals except the brutal hard-shadow black, which
   is the theme's own device.
   ========================================================================== */

/* ---------- shared: the display face, per theme ----------
   The numbers are display type, not prose. --sans is the display face in every
   theme (terminal redefines it to mono on purpose); riso and brutal use
   Bricolage for display, so the big numbers follow them there. */
.ev-num,.ev-claim,.ev-ask,.cl-quote{font-family:var(--sans);}
html[data-theme="riso"] .ev-num,
html[data-theme="riso"] .ev-claim,
html[data-theme="brutal"] .ev-num,
html[data-theme="brutal"] .ev-claim{font-family:"Bricolage Grotesque",var(--sans);font-weight:800;}

/* ==========================================================================
   SECTION A . the public receipt
   ========================================================================== */
.ev{border-top:1px solid var(--hair);}

/* the subject line: the repository, then one sentence about it */
.ev-subject{
  margin:1.1rem 0 0;max-width:60ch;
  font-family:var(--prose);font-size:1.05rem;line-height:1.6;color:var(--muted);
}
.ev-repo{
  font-family:var(--mono);font-size:.95rem;font-weight:500;color:var(--ink);
  border-bottom:1px solid var(--hair-strong);padding-bottom:1px;
  white-space:nowrap;
}

/* ---------- the three numbers: the visual centre of the page ---------- */
.ev-nums{
  margin:clamp(2.6rem,5vw,4rem) 0 0;
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:0 clamp(1.4rem,3vw,3rem);
  border-top:1px solid var(--hair-strong);
  border-bottom:1px solid var(--hair-strong);
}
.ev-cell{padding:clamp(1.8rem,3.4vw,2.8rem) 0 clamp(1.6rem,3vw,2.4rem);min-width:0;}
.ev-cell + .ev-cell{border-left:1px solid var(--hair);padding-left:clamp(1.4rem,3vw,3rem);}
.ev-num{
  display:block;
  font-size:clamp(6rem,12vw,10.5rem);
  font-weight:600;line-height:.82;letter-spacing:-.05em;
  font-variant-numeric:tabular-nums;color:var(--ink);
}
.ev-num-lab{
  margin:clamp(.9rem,1.6vw,1.3rem) 0 0;max-width:23ch;
  font-family:var(--mono);font-size:.78rem;font-weight:500;line-height:1.45;
  letter-spacing:.075em;text-transform:uppercase;color:var(--muted);
}

/* ---------- the falsifiability claim ---------- */
.ev-claim{
  margin:clamp(2.1rem,3.8vw,3rem) 0 0;max-width:32ch;
  font-size:clamp(1.55rem,3.1vw,2.5rem);font-weight:600;
  line-height:1.14;letter-spacing:-.024em;color:var(--ink);
}
.ev-claim-sub{
  margin:.7rem 0 0;max-width:52ch;
  font-family:var(--mono);font-size:.82rem;line-height:1.5;color:var(--muted);
}

/* ---------- the receipts table (hairline rows, never a pricing table) ---------- */
.ev-table{margin:clamp(2.6rem,5vw,4rem) 0 0;}
.ev-row{
  display:grid;
  grid-template-columns:4.6rem minmax(0,1fr) 13rem;
  align-items:baseline;gap:0 1.4rem;
  padding:1.1rem 0;
  border-top:1px solid var(--hair);
}
.ev-head{
  padding:0 0 .7rem;border-top:0;border-bottom:1px solid var(--hair-strong);
}
.ev-head span{
  font-family:var(--mono);font-size:.68rem;font-weight:500;
  letter-spacing:.13em;text-transform:uppercase;color:var(--muted);
}
.ev-id{
  font-family:var(--mono);font-size:.75rem;font-weight:500;letter-spacing:.04em;
  color:var(--muted);font-variant-numeric:tabular-nums;
}
.ev-promise{
  margin:0;max-width:52ch;
  font-family:var(--prose);font-size:1.03rem;line-height:1.45;color:var(--ink);
}
.ev-promise code{font-family:var(--mono);font-size:.94em;}
.ev-result{
  display:flex;align-items:baseline;gap:.5rem;
  font-family:var(--mono);font-size:.83rem;font-weight:500;line-height:1.4;
  letter-spacing:.01em;color:var(--ink);
}
.ev-ck{width:15px;height:15px;flex:0 0 auto;transform:translateY(2px);}
.ev-ck path{fill:none;stroke:var(--pass);stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round;}
.ev-cap{
  margin:1.2rem 0 0;max-width:none;
  font-family:var(--mono);font-size:.74rem;line-height:1.5;color:var(--muted);
}

/* ---------- don't take our word for it ---------- */
.ev-ask-row{margin:clamp(2.4rem,4vw,3.2rem) 0 0;}
.ev-ask{
  margin:0 0 .9rem;
  font-size:clamp(1.15rem,1.9vw,1.5rem);font-weight:600;
  letter-spacing:-.018em;line-height:1.25;color:var(--ink);
}
.ev-links{display:flex;flex-wrap:wrap;gap:.8rem 2rem;margin:0;}

/* ---------- the one published miss (subordinate, dark outline) ---------- */
.ev-miss-wrap{
  margin:clamp(2.6rem,5vw,3.6rem) 0 0;padding-top:clamp(1.8rem,3vw,2.4rem);
  border-top:1px solid var(--hair);
  display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);
  gap:1.6rem clamp(2rem,4vw,3.4rem);align-items:start;
}
.ev-miss{
  border:2px solid var(--ink);border-radius:var(--radius);
  background:var(--card);padding:1.3rem 1.4rem 1.1rem;
}
.ev-miss-k{
  display:flex;align-items:center;gap:.55rem;margin:0 0 .7rem;
  font-family:var(--mono);font-size:.72rem;font-weight:500;
  letter-spacing:.1em;text-transform:uppercase;color:var(--ink);
}
.ev-miss-k::before{content:"";flex:0 0 auto;width:7px;height:7px;background:var(--fail);}
.ev-miss p{margin:0;max-width:48ch;}
.ev-miss-p{font-family:var(--prose);font-size:1rem;line-height:1.55;color:var(--ink);}
.ev-miss-l{margin:.9rem 0 0;}
.ev-miss-side{
  margin:0;max-width:34ch;
  font-family:var(--prose);font-size:1.02rem;line-height:1.6;color:var(--muted);
}

/* ==========================================================================
   SECTION B . the final receipt + closing CTA
   ========================================================================== */
.cl{border-top:1px solid var(--hair);}
.cl-recall{max-width:66ch;}
.cl-quote{
  margin:1.1rem 0 1rem;max-width:26ch;
  font-size:clamp(1.4rem,2.6vw,2rem);font-weight:600;
  line-height:1.2;letter-spacing:-.022em;color:var(--ink);
}
.cl-quote code{font-family:var(--mono);font-size:.86em;}
.cl-p{
  margin:0;max-width:64ch;
  font-family:var(--prose);font-size:1.08rem;line-height:1.62;color:var(--ink);
}

.cl-close{
  margin:clamp(3rem,6vw,5rem) 0 0;padding-top:clamp(2.4rem,4.5vw,3.6rem);
  border-top:1px solid var(--hair-strong);
}
.cl-ask{
  margin:0;max-width:24ch;
  font-size:clamp(2.1rem,4.8vw,3.4rem);line-height:1.06;letter-spacing:-.03em;
}
.cl-frame{
  margin:1.2rem 0 0;max-width:58ch;
  font-family:var(--prose);font-size:1.06rem;line-height:1.6;color:var(--muted);
}
.cl-cta{display:flex;flex-wrap:wrap;align-items:center;gap:1rem 1.8rem;margin:clamp(1.8rem,3vw,2.4rem) 0 0;}
.cl-sig{
  display:flex;align-items:center;gap:1rem;
  margin:clamp(2.4rem,4vw,3.2rem) 0 0;
  font-family:var(--mono);font-size:.74rem;line-height:1.5;color:var(--muted);
}
.cl-sig svg{width:118px;height:auto;flex:0 0 auto;display:block;}
.cl-sig path{fill:none;stroke:var(--ink);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}
.cl-sig b{color:var(--ink);font-weight:500;}

/* ==========================================================================
   theme corrections
   ========================================================================== */
/* terminal: the tube draws line-work in low-alpha green. The numbers band and
   the table need a firmer rule or the whole ledger dissolves. */
html[data-theme="terminal"] .ev-nums{border-color:var(--hair-strong);}
html[data-theme="terminal"] .ev-row{border-top-color:var(--hair-strong);}
html[data-theme="terminal"] .ev-num{color:var(--signal);text-shadow:0 0 24px rgba(43,255,111,.28);}
html[data-theme="terminal"] .ev-claim{color:var(--signal);}
html[data-theme="terminal"] .ev-miss{border-color:var(--fail);box-shadow:inset 0 0 32px rgba(255,176,0,.05);}
html[data-theme="terminal"] .ev-miss-k{color:var(--fail);}
html[data-theme="terminal"] .ev-repo{border-bottom-color:var(--signal);}
html[data-theme="terminal"] .cl-quote{color:var(--signal);}
/* the theme's h2 scale is deliberately small; the closing question is the last
   thing on the page and has to carry it, so it opts out */
html[data-theme="terminal"] .cl-ask{font-size:clamp(1.75rem,3.4vw,2.6rem);letter-spacing:0;}
html[data-theme="terminal"] .ev-claim{letter-spacing:0;}

/* brutal: 1px hairlines vanish next to 3px plates. Everything gets heavier and
   the miss card takes the theme's hard offset. */
html[data-theme="brutal"] .ev-nums{border-top-width:3px;border-bottom-width:3px;}
html[data-theme="brutal"] .ev-cell + .ev-cell{border-left-width:2px;}
html[data-theme="brutal"] .ev-row{border-top-width:2px;}
html[data-theme="brutal"] .ev-head{border-bottom-width:3px;}
html[data-theme="brutal"] .ev,html[data-theme="brutal"] .cl,
html[data-theme="brutal"] .ev-miss-wrap,html[data-theme="brutal"] .cl-close{border-top-width:3px;}
html[data-theme="brutal"] .ev-num{letter-spacing:-.03em;}
html[data-theme="brutal"] .ev-num-lab,html[data-theme="brutal"] .ev-head span{color:var(--ink);font-weight:600;}
html[data-theme="brutal"] .ev-miss{border:3px solid var(--ink);box-shadow:8px 8px 0 var(--ink);}
html[data-theme="brutal"] .ev-miss-k::before{border:2px solid var(--ink);width:11px;height:11px;}
html[data-theme="brutal"] .ev-ck path{stroke-width:2.6;}
/* the poster has no low-contrast register: muted prose goes to full ink */
html[data-theme="brutal"] .ev-subject,html[data-theme="brutal"] .ev-miss-side,
html[data-theme="brutal"] .cl-frame{color:var(--ink);}

/* riso: display type is misregistered blue over pink. The numbers join in. */
html[data-theme="riso"] .ev-num{color:var(--signal);text-shadow:2px 2px 0 rgba(var(--fail-rgb,200,50,30),.28);}

/* olo and acid ride the tokens unchanged. One correction for night: on a dark
   ground a 2px full-ink outline is a pale box that shouts louder than the
   numbers, so the miss card steps back to the strong hairline. */
html[data-theme="night"] .ev-miss{border-color:var(--hair-strong);}
html[data-theme="night"] .ev-miss-k{color:var(--ink);}

/* ==========================================================================
   responsive
   ========================================================================== */
@media (max-width: 1000px){
  .ev-row{grid-template-columns:4.2rem minmax(0,1fr) 11.6rem;gap:0 1rem;}
  .ev-result{font-size:.78rem;}
}
@media (max-width: 820px){
  .ev-nums{grid-template-columns:1fr;}
  .ev-cell{padding:1.5rem 0 1.4rem;}
  .ev-cell + .ev-cell{border-left:0;border-top:1px solid var(--hair);padding-left:0;}
  html[data-theme="brutal"] .ev-cell + .ev-cell{border-top-width:2px;}
  .ev-num{font-size:clamp(6.5rem,22vw,8.5rem);}
  .ev-num-lab{max-width:30ch;}
  .ev-miss-wrap{grid-template-columns:1fr;}
  .ev-miss-side{max-width:58ch;}
}
@media (max-width: 700px){
  .ev-row{
    grid-template-columns:minmax(0,auto) minmax(0,1fr);
    grid-template-areas:"id result" "promise promise";
    gap:.45rem 1rem;align-items:baseline;
  }
  .ev-id{grid-area:id;}
  .ev-result{grid-area:result;justify-content:flex-end;text-align:right;font-size:.76rem;}
  .ev-promise{grid-area:promise;font-size:1rem;max-width:none;}
  .ev-head{grid-template-areas:"id result";}
  .ev-head .ev-h-promise{display:none;}
  .ev-head .ev-h-id{grid-area:id;}
  .ev-head .ev-h-result{grid-area:result;text-align:right;}
  .ev-links{flex-direction:column;gap:.7rem;}
  .cl-cta{flex-direction:column;align-items:stretch;}
  .cl-cta .btn{justify-content:center;}
  .cl-cta .cta-quiet{align-self:flex-start;}
  .cl-sig{flex-wrap:wrap;gap:.8rem;}
}
@media (max-width: 420px){
  .ev-num{font-size:6.4rem;}
  .ev-repo{white-space:normal;}
}
