/* =====================================================================
   Paper and Ink · essays/the-systems-came-back.css
   "The Systems Came Back. The Season Didn't.": 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 remediation invoice beside a twelve-week season calendar (Figure 1)
   and a restore plan with a choice of order (Figure 2).
   Gold = the remediation bill; blue = the business calendar. */

/* ---- 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 invoice and the season ---------------------------------- */
.ledgers { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 20px 28px; align-items: center; overflow-x: clip; overflow-clip-margin: 14px; padding-top: 6px; }
.inv, .cal, .plan { position: relative; padding: 1rem 1.1rem 1.1rem; font-family: var(--mono); font-size: .74rem; line-height: 1.5; color: var(--slip-ink); }
.inv { background: var(--noise), var(--slip); border-top: 5px solid var(--slip-once); transform: rotate(-1deg); animation: fade .6s ease .1s both; }
.cal { background: var(--noise), var(--sheet); border-top: 5px solid var(--slip-life); transform: rotate(.6deg); animation: fade .6s ease .7s both; }
.ih { font-family: var(--sans); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; opacity: .75; margin: 0 0 .6rem; }
.ir { display: flex; justify-content: space-between; gap: .6rem; margin: 0; padding: .25rem 0; border-bottom: 1px solid color-mix(in srgb, var(--slip-ink) 18%, transparent); }
.ir span { min-width: 0; }
.ir b { font-weight: 500; color: var(--slip-once); }
.if { margin: .7rem 0 0; font-family: var(--serif); font-style: italic; font-size: 1rem; }
.cal .if { color: var(--slip-life); }
/* twelve weeks in a row: down weeks hatched in blue, the restore week outlined */
.weeks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.weeks li { text-align: center; padding: .45rem 0; border: 1.4px solid color-mix(in srgb, var(--slip-life) 45%, transparent); color: var(--slip-life); font-variant-numeric: tabular-nums; }
.weeks li.down, .k.down { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--slip-life) 28%, transparent) 0 3px, transparent 3px 6px); }
.weeks li.back, .k.back { border: 2px solid var(--slip-life); font-weight: 600; }
.key { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: .6rem 0 0; font-family: var(--sans); font-size: .72rem; }
.key span { display: inline-flex; align-items: center; gap: .35rem; }
.k { display: inline-block; width: 14px; height: 14px; border: 1.4px solid color-mix(in srgb, var(--slip-life) 45%, transparent); }

/* ---- Figure 2: the restore plan -------------------------------------------- */
.pick { border: 0; margin: 0 0 1.1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-family: var(--sans); font-size: .86rem; color: var(--ink); }
.pick legend { padding: 0; margin-bottom: .35rem; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pick label { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; }
.pick input { accent-color: var(--life); margin: 0; }
.pick input:focus-visible { outline: 2px solid var(--life); outline-offset: 3px; }
.plan { max-width: 640px; background: var(--noise), repeating-linear-gradient(transparent 0 27px, var(--grid-major) 27px 28px), var(--slip); transform: rotate(.3deg); box-shadow: 0 1px 1px var(--shadow), 0 10px 24px -12px var(--shadow-deep); }
.plan::before, .plan::after { content: ""; position: absolute; top: -11px; width: 92px; height: 26px; background: var(--noise), var(--tape); }
.plan::before { left: 22px; transform: rotate(-4deg); }
.plan::after { right: 22px; transform: rotate(5deg); }
.pg { font-family: var(--sans); font-size: .82rem; }
.pr { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) 6rem; gap: .3rem 1rem; align-items: baseline; padding: .45rem 0; border-bottom: 1px solid color-mix(in srgb, var(--slip-ink) 15%, transparent); }
.pr span { min-width: 0; }
.phd { font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; border-bottom: 1.5px solid currentColor; }
.phd span:last-child { text-align: right; }
.pr .once { color: var(--slip-once); font-weight: 600; }
.pr b.life { color: var(--slip-life); font-family: var(--serif); font-size: 1.3rem; font-weight: 500; text-align: right; line-height: 1; }
.pn { margin: .9rem 0 0; }

/* Phone mode: the invoice and the calendar stack; the weeks wrap six to a row;
   the plan drops its middle column under the system name. */
@media (max-width: 560px) {
  .ledgers { grid-template-columns: minmax(0, 1fr); }
  .ih { font-size: .7rem; letter-spacing: .08em; }
  .weeks { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .pr { grid-template-columns: minmax(0, 1fr) 4.5rem; }
  .pr span:nth-child(2) { grid-column: 1; grid-row: 2; color: var(--slip-ink); font-size: .78rem; }
  .phd span:nth-child(2) { display: none; }
}
