/* =====================================================================
   Paper and Ink · essays/the-invoice-does-not-draw-the-boundary.css
   "The Invoice Does Not Draw the Boundary": the figures only this essay uses.
   Loaded after the shared stylesheets; everything shared lives in css/.
   ===================================================================== */

/* Layout: one 64ch reading column on grained paper; two figures break out to 860px:
   two folded statements of work with a taped acceptance note between them (Figure 1),
   and a retained-work worksheet on graph paper (Figure 2).
   Gold = contracted execution; blue = retained coordination responsibility. */

/* ---- 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; }
sup.ref + sup.ref { margin-left: 3px; }
.sources li:target { color: var(--ink); background: var(--life-soft); }

/* ---- Figure 1: two statements of work and the note between them -------- */
/* clip sideways overflow so a stamp's starting scale can never widen the page on a phone */
.sowfig {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 196px) minmax(0, 1fr); gap: 26px; align-items: start;
  overflow-x: clip; overflow-clip-margin: 14px; padding: 10px 4px 6px;
}
.sow {
  position: relative; box-sizing: border-box; padding: 18px 18px 64px;
  background: var(--noise), var(--slip);
  font-family: var(--mono); font-size: .76rem; line-height: 1.7;
}
/* the two creases of a letter folded in thirds, in graphite */
.sow::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(transparent calc(33.3% - 1px), var(--shadow-deep) calc(33.3% - 1px) 33.3%, transparent 33.3%),
    linear-gradient(transparent calc(66.6% - 1px), var(--shadow-deep) calc(66.6% - 1px) 66.6%, transparent 66.6%);
  opacity: .35;
}
.sow.sa { transform: rotate(-1.2deg); }
.sow.sb { transform: rotate(.9deg); margin-top: 18px; }
.sow .sh { margin: 0; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; }
.sow .ss { margin: 0 0 10px; font-size: .66rem; letter-spacing: .08em; opacity: .7; }
.sow .rule { border-top: 1px dashed currentColor; opacity: .45; margin: 6px 0 8px; }
.sow .ln { display: flex; gap: 6px; margin: 0; }
.sow .ln span { flex: none; }
.sow .ln i { flex: 1; min-width: 10px; border-bottom: 1px dotted currentColor; opacity: .4; transform: translateY(-.45em); }
.sow .ln.once { color: var(--slip-once); }
.sow .ln.life, .sow .val { color: var(--slip-life); }
.sow .val { margin: 0 0 0 2.2ch; font-family: var(--serif); font-style: italic; font-size: 1.02rem; line-height: 1.3; }
.sow .stamp { color: var(--slip-once); position: absolute; right: 16px; bottom: 16px; }
.sow.sa .stamp { transform: rotate(-7deg); animation-delay: .7s; }
.sow.sb .stamp { transform: rotate(-4deg); animation-delay: 1s; }

.accnote {
  position: relative; box-sizing: border-box; margin-top: 64px; padding: 22px 14px 18px;
  background: var(--noise), var(--slip); transform: rotate(1.6deg);
  font-family: var(--mono); font-size: .72rem; line-height: 1.6;
  animation: fade .7s ease 1.6s both;
}
/* a strip of masking tape holds the note down */
.accnote::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 84px; height: 24px; margin-left: -42px;
  background: var(--noise), var(--tape); transform: rotate(-4deg);
}
.accnote .nh { margin: 0 0 6px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; }
.accnote .hand { margin: 0 0 10px; font-size: 1rem; line-height: 1.3; }
.accnote .q { margin: 0; color: var(--slip-life); }
.accnote .blank { display: block; height: 18px; margin: 0 0 6px; border-bottom: 1.5px solid currentColor; opacity: .5; }
.accnote .fill { margin: 0 0 8px; color: var(--slip-life); font-size: 1.02rem; }
.accnote .stamp { color: var(--slip-life); display: table; margin: 12px auto 0; transform: rotate(5deg); animation-delay: 2.2s; }
/* pen arrows from the note to the blue line on each contract */
.accnote .pen { position: absolute; top: 30px; width: 40px; height: 30px; }
.accnote .pen.l { left: -42px; transform: scaleX(-1); }
.accnote .pen.r { right: -42px; }
.accnote .pen path { animation-delay: 2s; }

/* with the script: the button fills in the missing responsibility */
.sowfig .fill { display: none; }
.sowfig.filled .fill { display: block; animation: fade .7s ease both; }
.sowfig.filled .accnote .blank { display: none; }
.sowfig.filled .accnote .stamp { animation: thump .45s cubic-bezier(.3, 1.6, .5, 1) .3s both; }
.sowbar { margin: 16px 0 0; font-family: var(--sans); font-size: .8rem; }
.sowbar:not(.on) { display: none; }

/* ---- Figure 2: the retained-work worksheet ------------------------------ */
.retain2 .lab-life, .retain2 .it-life { fill: var(--slip-life); }
.retain2 .lab-once, .retain2 .it-once { fill: var(--slip-once); }
.retain2 .pen-g { fill: var(--graphite); }
.retain2 .bl { stroke: var(--slip-life); }
.retain2 .gd { stroke: var(--slip-once); }
.retain2 .gp { stroke: var(--graphite); }
.retain2 .div { stroke: var(--graphite); stroke-width: 1; stroke-dasharray: 2 6; opacity: .55; }
.retain2 .loop { fill: none; stroke: var(--graphite); stroke-width: 1.5; stroke-linecap: round; }
.retain2 .cname { font-family: var(--mono); font-size: 12.5px; fill: var(--slip-ink); letter-spacing: .04em; }
.retain2 .cex { font-family: var(--serif); font-style: italic; font-size: 14px; fill: var(--graphite); }
.retain2 .role { font-family: var(--mono); font-size: 11.5px; fill: var(--slip-ink); }
.retain2 .tk { stroke: var(--slip-ink); stroke-width: 1; opacity: .55; }
.retain2 .tk.major { opacity: .9; stroke-width: 1.3; }
.retain2 .rowlab { font-family: var(--sans); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; fill: var(--graphite); }
.retain2 .col { transition: opacity .3s ease; }
.retain2 .col.dim { opacity: .95; }
.retain2 .cursor { stroke: var(--graphite); stroke-width: 1.2; stroke-dasharray: 5 5; opacity: .7; }
.retain2 .rdot { fill: var(--slip); stroke-width: 2.4; stroke: var(--slip-life); }
.retain2 .tagbox { fill: var(--slip); stroke: var(--slip-ink); stroke-width: 1; }
.retain2 .tag-life { fill: var(--slip-life); }
.retain2 .tag-once { fill: var(--slip-once); font-weight: 500; }
/* redraws after the breakpoint changes appear at once, without replaying the load sequence */
.retain2 .still .ink path, .retain2 .still .fade { animation: none; }

@media (max-width: 640px) {
  .sowfig { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .sow.sb { margin-top: 0; }
  .accnote { margin: 0 auto; width: min(100%, 300px); }
  .accnote .pen { display: none; }
}

/* Phone mode: the two contracts and the note stack in reading order, A, note, B; the
   worksheet is redrawn by the page script as a ruler of the three kinds of work with the
   selected one written out in full underneath, and its labels grow. */
@media (max-width: 560px) {
  .sow { padding: 16px 14px 60px; font-size: .74rem; }
  .sheet.retain2 { min-width: 0; user-select: none; }
  .sheet-scroll:has(.retain2) { overflow-x: clip; }
  .retain2 .svgnote { font-size: 17px; }
  .retain2 .svglab { font-size: 18px; }
  .retain2 .cname { font-size: 15px; }
  .retain2 .cex { font-size: 16px; }
  .retain2 .role { font-size: 15px; }
  .retain2 .tick { font-size: 15px; }
  .retain2 .tagtext { font-size: 15px; }
  .retain2 .rowlab { font-size: 15px; letter-spacing: .1em; }
}
}
