/* =====================================================================
   Paper and Ink · essays/a-safer-answer-needs-a-harder-test.css
   "A Safer Answer Needs a Harder Test": the figures only this dispatch uses.
   Loaded after the shared stylesheets; everything shared lives in css/.
   ===================================================================== */

/* Layout: one 64ch reading column on grained paper; two paper objects break out to 860px:
   an open envelope of practiced cases beside a sealed envelope of changed ones (Figure 1)
   and a changed-condition test sheet that reveals one condition at a time (Figure 2).
   Gold = performance on familiar cases; blue = behavior in unfamiliar cases. */

/* ---- footnote markers -------------------------------------------------- */
sup.ref { font-family: var(--sans); font-size: .62em; line-height: 0; margin-left: 1px; }
sup.ref a { text-decoration: none; color: var(--life); padding: 0 1px; }
sup.ref a:hover { text-decoration: underline; }
.sources li:target { color: var(--ink); background: var(--life-soft); }

/* ---- Figure 1: the two envelopes ----------------------------------------- */
/* two columns of equal height, each envelope with its note directly beneath, so the notes sit level */
.envfig { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; align-items: stretch; overflow-x: clip; overflow-clip-margin: 14px; padding-top: 6px; }
.ecol { min-width: 0; display: grid; grid-template-rows: 1fr auto; gap: 14px; }
.env { position: relative; background: var(--noise), var(--sheet); padding: 3.4rem 1.3rem 1.3rem; }
.env.once { color: var(--slip-once); border: 1.5px solid color-mix(in srgb, var(--slip-once) 55%, transparent); transform: rotate(-.7deg); animation: fade .6s ease .1s both; }
.env.life { color: var(--slip-life); border: 1.5px solid color-mix(in srgb, var(--slip-life) 55%, transparent); transform: rotate(.6deg); animation: fade .6s ease 1.6s both; }
.flap { position: absolute; top: 0; left: 0; width: 100%; height: 3rem; overflow: visible; }
.flap path { fill: none; stroke: currentColor; stroke-opacity: .55; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.eh { font-family: var(--mono); font-size: .66rem; color: var(--slip-ink); opacity: .7; margin: 0; }
.et { font-family: var(--serif); font-style: italic; font-size: 1.35rem; line-height: 1.2; margin: .15rem 0 0; }
.ep { font-family: var(--sans); font-size: .64rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin: .3rem 0 .8rem; }
/* the practice cards spill out of the open envelope */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.cards li {
  display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; background: var(--noise), var(--slip); color: var(--slip-ink);
  font-family: var(--mono); font-size: .72rem; padding: .45rem .6rem; border-left: 3px solid var(--slip-once);
  box-shadow: 0 1px 1px var(--shadow); animation: fade .5s ease both;
}
.cards li span { min-width: 0; }
.cards li b { flex: none; font-family: var(--sans); font-size: .58rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--slip-once); }
.cards li:nth-child(1) { transform: rotate(-1deg); animation-delay: .5s; }
.cards li:nth-child(2) { transform: rotate(.8deg) translateX(6px); animation-delay: .75s; }
.cards li:nth-child(3) { transform: rotate(-.5deg); animation-delay: 1s; }
/* the sealed envelope only shows its label: the list of what changes */
.seal { list-style: none; margin: 0; padding: .5rem .7rem; border: 1.5px dashed currentColor; font-family: var(--mono); font-size: .72rem; line-height: 1.7; animation: fade .5s ease 2s both; }
.seal li::before { content: "· "; }
.env .stamp.s1 { display: table; margin: .8rem .2rem 0 auto; color: var(--slip-life); font-size: .7rem; transform: rotate(-4deg); animation-delay: 2.5s; }
.fnote { margin: 0; padding-left: .4rem; color: var(--ink); }
.fnote.n1 { animation: fade .7s ease 1.3s both; }
.fnote.n2 { animation: fade .7s ease 2.9s both; }
.fnote.n1 b { color: var(--once); }
.fnote.n2 b { color: var(--life); }

/* ---- Figure 2: the changed-condition sheet ------------------------------ */
.ccs { position: relative; background: var(--noise), var(--slip); padding: 1.4rem 1.3rem 1.1rem; transform: rotate(.3deg); overflow-x: clip; overflow-clip-margin: 14px; }
.ccs::before, .ccs::after { content: ""; position: absolute; top: -11px; width: 80px; height: 24px; background: var(--noise), var(--tape); }
.ccs::before { left: 20px; transform: rotate(-5deg); }
.ccs::after { right: 20px; transform: rotate(4deg); }
.ch { font-family: var(--sans); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; margin: 0; opacity: .8; }
.crule { font-family: var(--serif); font-size: 1.05rem; margin: .5rem 0 .9rem; }
.crule b { font-weight: 500; }
.cgrid { display: grid; font-size: .74rem; }
.crow { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; gap: .8rem; padding: .45rem 0; border-bottom: 1px solid color-mix(in srgb, var(--slip-ink) 18%, transparent); color: var(--slip-life); animation: fade .45s ease both; }
.crow[hidden] { display: none; }
.crow span { min-width: 0; }
.crow span:first-child { font-family: var(--sans); font-weight: 600; }
.crow span:nth-child(2), .crow span:nth-child(4) { font-family: var(--mono); font-size: .7rem; color: var(--slip-ink); }
.crow span:nth-child(3) { font-family: var(--serif); font-style: italic; font-size: .95rem; line-height: 1.25; }
.crow span:nth-child(4) { opacity: .75; }
.chd { color: var(--slip-ink); border-bottom: 1.5px solid currentColor; }
.chd span, .chd span:nth-child(n) { font-family: var(--sans); font-style: normal; font-size: .66rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: 1; }
.crow.base { color: var(--slip-once); }
/* the failure keeps its place: a pencil box around what was observed */
.crow.fail span:nth-child(3) { outline: 1.5px dashed currentColor; outline-offset: 3px; }
.crow:nth-child(3) { animation-delay: .5s; }
.crow:nth-child(4) { animation-delay: .8s; }
.crow:nth-child(5) { animation-delay: 1.1s; }
.crow:nth-child(6) { animation-delay: 1.4s; }
.crow:nth-child(7) { animation-delay: 1.7s; }
.cctl { margin: .9rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-items: baseline; }
.ccount { font-family: var(--sans); font-size: .72rem; color: var(--graphite); }
.ccs .btn { color: var(--slip-ink); }

/* Phone mode: the envelopes stack, each with its note; each row of the sheet becomes a small card
   with its column names written beside the values. */
@media (max-width: 640px) {
  .envfig { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .env { padding: 3rem 1rem 1.1rem; }
  .eh, .ch { font-size: .7rem; }
  .ccs { padding: 1.3rem .9rem 1rem; }
  .chd { display: none; }
  .crow { grid-template-columns: 5.6rem minmax(0, 1fr); gap: .25rem .6rem; padding: .7rem 0; }
  .crow span:first-child { grid-column: 1 / -1; font-size: .8rem; }
  .crow span:not(:first-child)::before { content: attr(data-l); display: block; font-family: var(--sans); font-style: normal; font-size: .62rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--slip-ink); opacity: .7; }
  .crow span:not(:first-child) { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr); gap: .6rem; grid-column: 1 / -1; align-items: baseline; }
  .crow span:nth-child(2), .crow span:nth-child(4) { font-size: .74rem; }
}
