/* =====================================================================
   Paper and Ink · essays/the-ruling-is-not-the-receipt.css
   "The Ruling Is Not the Receipt": 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:
   a supplier quote beside a revised per-unit customs calculation (Figure 1)
   and a two-lane calendar of border rules and one buyer's own dates (Figure 2).
   Gold = the applicable border charge; blue = the buyer's realized purchase cost; assumptions are graphite. */

/* ---- 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 quote and the customs calculation --------------------- */
/* clip sideways overflow so a stamp's starting scale can never widen the page on a phone */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; align-items: start; overflow-x: clip; overflow-clip-margin: 14px; padding: 10px 4px 0; }
.pd { position: relative; padding: 1.1rem 1.2rem 1.2rem; font-family: var(--mono); font-size: .74rem; line-height: 1.55; animation: fade .6s ease both; }
.pd.quote { background: var(--noise), var(--sheet); transform: rotate(-1.2deg); border-top: 5px solid var(--slip-life); animation-delay: .1s; }
.pd.calc { background: var(--noise), var(--slip); transform: rotate(1deg); margin-top: 22px; animation-delay: .6s; }
.ph { font-family: var(--sans); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; margin: 0; opacity: .8; }
.pn { font-size: .68rem; opacity: .65; margin: .1rem 0 .7rem; }
.pr { display: flex; justify-content: space-between; gap: .8rem; border-bottom: 1px solid color-mix(in srgb, var(--slip-ink) 22%, transparent); padding: .2rem 0; }
.pr span { opacity: .75; }
.pr b { font-weight: 500; text-align: right; }
.pr.big b { font-family: var(--serif); font-size: 1.35rem; font-weight: 400; line-height: 1.1; }
.pr.price b { color: var(--slip-life); }
.pr.old { color: var(--graphite); }
.pr.old b { text-decoration: line-through; text-decoration-color: var(--graphite); }
.pr.new { color: var(--slip-once); }
.pr.tot { border-bottom: 1.5px solid var(--slip-ink); }
.pr.tot b .was { color: var(--graphite); text-decoration: line-through; font-family: var(--mono); font-size: .74rem; margin-right: .5rem; }
.pr.tot b .now { color: var(--slip-once); }
.quote .c-life { animation-delay: 1s; }
.calc .new { animation: fade .6s ease 1.5s both; }
.calc .tot { animation: fade .6s ease 1.9s both; }
.assume { font-family: var(--serif); font-style: italic; font-size: .92rem; line-height: 1.3; color: var(--graphite); margin: .8rem 0 0; }
.calc .stamp { display: table; margin: .7rem 0 0 auto; color: var(--slip-once); transform: rotate(-6deg); font-size: .66rem; animation-delay: 2.3s; }
.pnotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 40px; margin-top: 1.4rem; }
.pnotes .mnote p { color: var(--ink); }
.pnotes .n1 { animation: fade .7s ease 2.6s both; }
.pnotes .n2 { animation: fade .7s ease 3.1s both; }
.pnotes .n1 .pen path { animation-delay: 2.6s; }
.pnotes .n2 .pen path { animation-delay: 3.1s; }
.pnotes .n1 b { color: var(--once); }
.pnotes .n2 b { color: var(--life); }
.again { margin-top: 1rem; }

/* ---- Figure 2: the two-lane calendar ------------------------------------- */
.cal {
  position: relative; background: var(--noise), var(--sheet); padding: 1.2rem 1rem 1.1rem; transform: rotate(-.4deg);
  display: grid; grid-template-columns: 5.6rem repeat(6, minmax(0, 1fr)); overflow-x: clip; overflow-clip-margin: 14px;
  font-family: var(--mono); font-size: .68rem; line-height: 1.4; color: var(--slip-ink);
}
.cal::before, .cal::after { content: ""; position: absolute; top: -11px; width: 80px; height: 24px; background: var(--noise), var(--tape); }
.cal::before { left: 20px; transform: rotate(-5deg); }
.cal::after { right: 20px; transform: rotate(4deg); }
.col { display: grid; grid-template-rows: auto 1fr 1fr; gap: .5rem; padding: 0 .45rem; border-left: 1px dashed color-mix(in srgb, var(--slip-ink) 28%, transparent); min-width: 0; }
.col.lab { border-left: 0; padding-left: 0; }
.cd { margin: 0; font-weight: 500; font-size: .74rem; padding-bottom: .3rem; border-bottom: 1px solid var(--graphite); }
.cd small { display: block; font-weight: 400; font-size: .6rem; letter-spacing: .06em; color: var(--graphite); }
.lab .cd { border-bottom-color: transparent; }
.ln { font-family: var(--sans); font-size: .6rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin: 0; padding-top: .3rem; }
.ln.once { color: var(--slip-once); }
.ln.life { color: var(--slip-life); }
.ln small { display: block; font-weight: 400; letter-spacing: .04em; text-transform: none; color: var(--graphite); }
.cb { margin: 0; padding: .4rem .45rem; min-height: 4.2rem; animation: fade .5s ease both; }
.cb.once { color: var(--slip-once); border-top: 2px solid var(--slip-once); }
.cb.life { color: var(--slip-life); border-top: 2px solid var(--slip-life); }
.cb.none { border-top-style: dotted; border-top-width: 1px; opacity: .55; }
.col:nth-child(2) .cb { animation-delay: .3s; }
.col:nth-child(3) .cb { animation-delay: .8s; }
.col:nth-child(4) .cb { animation-delay: 1.3s; }
.col:nth-child(5) .cb { animation-delay: 1.8s; }
.col:nth-child(6) .cb { animation-delay: 2.3s; }
.col:nth-child(7) .cb { animation-delay: 2.8s; }
.cb.life b { font-weight: 500; }

@media (max-width: 760px) {
  .cal { grid-template-columns: 4.6rem repeat(6, minmax(0, 1fr)); font-size: .62rem; padding-inline: .7rem; }
  .col { padding: 0 .3rem; }
}
@media (max-width: 640px) {
  .pair { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pd.calc { margin-top: 10px; }
  .pnotes { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .pnotes .pen { display: none; }
}

/* Phone mode: the two documents stack. The calendar turns into one row per date, each with its border entry
   in gold and the buyer's entry in blue, labeled inline instead of by a lane column. */
@media (max-width: 560px) {
  .pd { padding: 1rem 1rem 1.1rem; font-size: .7rem; }
  .cal { grid-template-columns: minmax(0, 1fr); gap: .9rem; padding: 1.2rem .9rem 1rem; font-size: .7rem; }
  .col.lab { display: none; }
  .col { grid-template-rows: none; border-left: 0; padding: 0; gap: .35rem; }
  .cb { min-height: 0; }
  .cb.none { display: none; }
  .cb.once::before, .cb.life::before { display: block; font-family: var(--sans); font-size: .58rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .15rem; }
  .cb.once::before { content: "Border rules"; }
  .cb.life::before { content: "This buyer"; }
}
