/* Work page (/work), design v3: same two-ink riso zine as site.css. Only the work-page pieces live here.
   The page reads like the back pages of the zine: ruled ledgers, a flow drawn by the same pen, the audit as a numbered list. */
.work-page .hero { padding: 30px 0 46px; }
.work-page .wrap { max-width: 900px; }
.work-page .masthead.wrap { max-width: var(--max); }
.work-page .hero h1 { font-size: clamp(38px, 9vw, 72px); margin-bottom: 22px; max-width: 14ch; }
.work-page section { position: relative; padding: 56px 0; }
.work-page section + section::before, .work-page .hero + section::before { content: ""; position: absolute; top: 0; left: 20px; right: 20px; max-width: 860px; margin: 0 auto; height: 8px; background: var(--rule) no-repeat center / 100% 100%; }
.work-page .flood + footer::before, .work-page section.flood::before { display: none; }
.work-page .flood { background: var(--flood) var(--grain); }
.meta { font-size: 16.5px; font-style: italic; color: var(--pencil); }
.work-page h2 { margin-bottom: 12px; }

/* The three headline numbers, written as a ledger: number, sentence, dates. No big-number strip. */
.ledger { margin: 26px 0 22px; }
.ledger li { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 12px 0; background: var(--rule) no-repeat 0 100% / 100% 5px; }
.ledger b { font: 800 24px/1.2 var(--hand); color: var(--brick); }
.ledger small { font-size: 15.5px; color: var(--pencil); font-style: italic; }

/* "Read with this" notes: a small pen frame, never a coloured side bar */
.caveat { padding: 18px 20px 16px; margin: 22px 0; background: var(--frame) no-repeat 0 0 / 100% 100%; font-size: 18px; }
.caveat strong { font-family: var(--hand); font-weight: 600; }
.no-sample { padding: 24px; text-align: center; font: 600 20px var(--hand); color: var(--pencil); background: var(--frame) no-repeat 0 0 / 100% 100%; }

/* Number tables, ruled by hand */
.nums { width: 100%; border-collapse: collapse; font-size: 17px; margin: 12px 0 18px; font-variant-numeric: tabular-nums lining-nums; }
.nums th, .nums td { text-align: left; padding: 9px 8px 9px 0; vertical-align: top; background: var(--rule) no-repeat 0 100% / 100% 4px; }
.nums th { font: 600 16px var(--hand); color: var(--pencil); }
.nums td:nth-child(2) { font-weight: 700; white-space: nowrap; color: var(--brick); }

/* Welcome flow, drawn with the pen: boxes with uneven corners, pen arrows between them */
.diagram { margin: 18px 0 8px; font-size: 16px; max-width: 560px; }
.node { border: 2px solid var(--ink); border-radius: 9px 13px 8px 14px / 13px 8px 14px 9px; padding: 8px 10px; text-align: center; background: var(--paper); }
.node.trigger { background: var(--ink); color: var(--paper); font-weight: 700; }
.node.wait { border-style: dashed; color: var(--pencil); }
.node.split { background: var(--flood); font-weight: 700; }
.node.tag { font-size: 14.5px; color: var(--pencil); border-width: 1.5px; }
.arrow { height: 28px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Cpath d='M12 3 C 11 10, 13 16, 12 24 M6.5 18 C 8.5 20, 10.5 22, 12 24.5 C 13.5 22, 15.5 20, 17.5 18' fill='none' stroke='%23c4583a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 22px 26px; }
.branches { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.branch-label { text-align: center; font: 600 17px var(--hand); color: var(--brick); margin-bottom: 4px; }

/* The audit: numbered by hand, the fix in brick */
.audit li { display: flex; gap: 16px; padding: 16px 0; background: var(--rule) no-repeat 0 100% / 100% 5px; }
.audit .n { flex: none; width: 36px; height: 36px; border: 2.2px solid var(--ink); border-radius: 52% 48% 55% 45% / 48% 55% 45% 52%; display: grid; place-items: center; font: 800 17px var(--hand); }
.audit p { margin: 0 0 4px; }
.audit .fix { color: var(--brick); font-weight: 700; }

.work-page .final h2 { max-width: 16ch; }
.work-page .cta { margin-top: 22px; }
.work-page footer { padding: 28px 0 48px; }

@media (min-width: 960px) {
  .work-page section { padding: 84px 0; }
  .work-page section + section::before, .work-page .hero + section::before { left: 40px; right: 40px; }
  .ledger li { grid-template-columns: 210px 1fr; column-gap: 24px; align-items: baseline; }
  .ledger small { grid-column: 2; }
}

/* 18/11: same page breaks as the main page. "How to read" and the audit sit on the torn-edge terracotta tint
   (--tint / --torn-* come from site.css); the welcome flow stays on plain paper; thin rules between pages go. */
.work-page section + section::before, .work-page .hero + section::before { display: none; }
.work-page section { padding: 84px 0; }
.work-page .how, .work-page #audit { isolation: isolate; }
.work-page .how::after, .work-page #audit::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--tint) var(--grain);
  -webkit-mask: var(--torn-top) top left / 600px 16px repeat-x, var(--torn-bottom) bottom left / 600px 16px repeat-x, linear-gradient(#000, #000) center / 100% calc(100% - 30px) no-repeat;
          mask: var(--torn-top) top left / 600px 16px repeat-x, var(--torn-bottom) bottom left / 600px 16px repeat-x, linear-gradient(#000, #000) center / 100% calc(100% - 30px) no-repeat;
}
.work-page .how .caveat { background-color: transparent; }
.work-page #audit .n { background: var(--tint); }
@media (min-width: 960px) { .work-page section { padding: 120px 0; } }