/* =====================================================================
   Paper and Ink · essays/the-backup-has-to-come-back.css
   "The Backup Has to Come Back": 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:
   a recovery docket, a gold backup slip clipped to a blue exercise record (Figure 1),
   and two rulers on graph paper, one for the age of the restored data and one for
   the outage (Figure 2). Gold = stored backup; blue = demonstrated service recovery. */

/* ---- 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 recovery docket --------------------------------------- */
/* clip sideways overflow so a stamp's starting scale can never widen the page on a phone */
.dockfig { overflow-x: clip; overflow-clip-margin: 14px; padding: 10px 10px 0; }
.docket { position: relative; display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 0 36px; align-items: start; }
.bslip, .xrec { position: relative; box-sizing: border-box; font-family: var(--mono); font-size: .78rem; line-height: 1.7; }
.bslip {
  padding: 22px 22px 34px; margin-top: 18px; color: var(--slip-once);
  background: var(--noise), var(--slip); transform: rotate(-1.4deg); animation: fade .6s ease both;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
}
.xrec { padding: 22px 22px 24px; color: var(--slip-life); background: var(--noise), var(--sheet); border-top: 5px solid var(--graphite); transform: rotate(.8deg); animation: fade .6s ease .9s both; }
.bh { margin: 0; text-align: center; letter-spacing: .18em; text-transform: uppercase; font-weight: 500; }
.bs { margin: 0; text-align: center; font-size: .68rem; letter-spacing: .1em; opacity: .95; }
.br { border-top: 1px dashed currentColor; opacity: .45; margin: 8px 0 10px; }
.bslip .ln { display: flex; gap: 6px; margin: 0; }
.bslip .ln span { flex: none; }
.bslip .ln i { flex: 1; min-width: 10px; border-bottom: 1px dotted currentColor; opacity: .4; transform: translateY(-.45em); }
.stamp.st1 { color: var(--slip-once); display: table; margin: 16px auto 0; transform: rotate(-7deg); animation-delay: .7s; }
/* the paper clip joining the two sheets: two graphite loops */
.clip {
  position: absolute; z-index: 2; left: calc(min(330px, 50%) + 4px); top: 2px; width: 22px; height: 64px;
  border: 2px solid var(--graphite); border-radius: 11px; transform: rotate(8deg); animation: fade .4s ease 1.4s both;
}
.clip::after { content: ""; position: absolute; left: 4px; right: 4px; top: 8px; bottom: 14px; border: 2px solid var(--graphite); border-radius: 7px; border-bottom: 0; }
.fields { margin: 0; display: grid; gap: 4px; }
.fields > div { display: grid; grid-template-columns: 8.4rem minmax(0, 1fr); gap: 8px; align-items: baseline; animation: fade .5s ease both; }
.fields > div:nth-child(1) { animation-delay: 1.2s; }
.fields > div:nth-child(2) { animation-delay: 1.4s; }
.fields > div:nth-child(3) { animation-delay: 1.6s; }
.fields > div:nth-child(4) { animation-delay: 1.8s; }
.fields > div:nth-child(5) { animation-delay: 2s; }
.fields > div:nth-child(6) { animation-delay: 2.2s; }
.fields > div:nth-child(7) { animation-delay: 2.4s; }
.fields dt { font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; }
.fields dd { margin: 0; font-size: 1rem; line-height: 1.35; color: var(--slip-life); }
.fields .blank dt { font-weight: 600; }
.fields .blank .line { display: block; height: 1.2em; border-bottom: 1.5px solid currentColor; opacity: .7; }
.stamp.st2 { color: var(--slip-life); display: table; margin: 14px 0 0 auto; transform: rotate(4deg); animation-delay: 3s; }
.notes { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 36px; margin-top: 1.2rem; }
.notes .mnote p { color: var(--ink); }
.notes .n1 { animation: fade .7s ease 1s both; }
.notes .n2 { animation: fade .7s ease 3.3s both; }
.notes .n1 .pen path { animation-delay: 1s; }
.notes .n2 .pen path { animation-delay: 3.3s; }
.notes b.g { color: var(--once); }
.notes b.b { color: var(--life); }

/* ---- Figure 2: two rulers --------------------------------------------------- */
.rulers2 { cursor: ew-resize; user-select: none; }
.rulers2 .gl { stroke: var(--slip-once); }
.rulers2 .bl { stroke: var(--slip-life); }
.rulers2 .hl { stroke: var(--slip-once); stroke-width: 1.2; opacity: .7; }
.rulers2 .pen-g { fill: var(--graphite); }
.rulers2 .lab-once { fill: var(--slip-once); }
.rulers2 .lab-life { fill: var(--slip-life); }
.rulers2 .pencil { fill: none; stroke: var(--graphite); stroke-width: 1.6; stroke-dasharray: 2 6; stroke-linecap: round; }
.rulers2 .tol { fill: none; stroke: var(--graphite); stroke-width: 1.4; stroke-dasharray: 3 4; }
.rulers2 .tol.bracket { stroke-dasharray: none; stroke-width: 1.2; stroke-linejoin: round; }
.rulers2 .loop { fill: none; stroke: var(--graphite); stroke-width: 1.5; stroke-linecap: round; }
.rulers2 .tk { stroke-width: 1; opacity: .6; }
.rulers2 .tk.major { opacity: .95; stroke-width: 1.3; }
.rulers2 .tk.once { stroke: var(--slip-once); }
.rulers2 .tk.life { stroke: var(--slip-life); }
.rulers2 .tick.once { fill: var(--slip-once); }
.rulers2 .tick.life { fill: var(--slip-life); }
.rulers2 .rowlab { font-family: var(--sans); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
.rulers2 .rowlab.once { fill: var(--slip-once); }
.rulers2 .rowlab.life { fill: var(--slip-life); }
.rulers2 .cursor { stroke: var(--graphite); stroke-width: 1.2; stroke-dasharray: 5 5; opacity: .7; }
.rulers2 .rdot { fill: var(--slip); stroke-width: 2.4; }
.rulers2 .rdot.once { stroke: var(--slip-once); }
.rulers2 .rdot.life { stroke: var(--slip-life); }
.rulers2 .tagbox { fill: var(--slip); stroke: var(--slip-ink); stroke-width: 1; }
.rulers2 .tag-once { fill: var(--slip-once); }
.rulers2 .tag-life { fill: var(--slip-life); font-weight: 500; }
/* redraws after a drag or a breakpoint change appear at once, without replaying the load sequence */
.rulers2 .still .ink path, .rulers2 .still .fade, .rulers2 .still .hatch { animation: none; }

@media (max-width: 640px) {
  .notes .pen { display: none; }
}

/* Phone mode: the slip and the record stack, slip first, with each note under its sheet
   and the clip hidden; the rulers are redrawn narrower and taller by the page script,
   and their labels grow. */
@media (max-width: 560px) {
  .docket { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .bslip { margin-top: 0; }
  .clip { display: none; }
  .fields > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .notes { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .sheet.rulers2 { min-width: 0; user-select: none; }
  .sheet-scroll:has(.rulers2) { overflow-x: clip; }
  .rulers2 .svgnote { font-size: 17px; }
  .rulers2 .svglab { font-size: 20px; }
  .rulers2 .tick { font-size: 15px; }
  .rulers2 .tagtext { font-size: 15px; }
  .rulers2 .rowlab { font-size: 14px; }
}
