/* The Ledger: a long scroll stitched together by one thread. Paper and ink sections alternate; the thread
   (a fixed dashed line) fills with pink stitches as you read, and every chapter hangs off it as a numbered knot. */

body.ledger { --tx: 12px; background: var(--paper); }
@media (min-width: 1280px) { body.ledger { --tx: calc((100vw - 1180px) / 2 - 30px); } }

/* ---------- the thread ---------- */
.thread { position: fixed; z-index: 40; top: 0; bottom: 0; left: var(--tx); width: 3px; margin-left: -1px; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(20, 9, 12, .34) 0 9px, transparent 9px 18px); }
.thread-fill { position: absolute; left: 0; top: 0; width: 100%; height: 0; background: repeating-linear-gradient(to bottom, var(--pink) 0 9px, transparent 9px 18px); }
.needle { position: absolute; left: 50%; top: 0; width: 15px; height: 15px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--pink); border: 3px solid var(--ink); box-shadow: 0 0 0 5px rgba(245, 39, 88, .22); }

.ch { position: relative; padding: clamp(78px, 13vw, 150px) 0; }
.ch > .wrap { position: relative; max-width: 1040px; padding-left: clamp(18px, 4vw, 44px); }
@media (max-width: 760px) { .ch > .wrap { padding-left: 22px; } }
.knot { position: absolute; z-index: 41; left: var(--tx); top: 64px; width: 30px; height: 30px; margin-left: -14px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); display: grid; place-items: center; font: 700 .7rem/1 var(--mono); color: var(--ink); transition: background .35s, color .35s, transform .35s var(--ease); }
.knot::before { content: attr(data-n); }
.knot.on { background: var(--pink); color: var(--cream); transform: scale(1.18) rotate(-6deg); }
.ink .knot { background: var(--ink); color: var(--cream); border-color: var(--cream); }
.ink .knot.on { background: var(--pink); border-color: var(--cream); }

/* ink sections have a torn top edge */
.ink { background: var(--ink); color: var(--cream); }
.ink::before { content: ""; position: absolute; left: 0; right: 0; top: -17px; height: 18px; pointer-events: none;
  background: linear-gradient(135deg, var(--ink) 25%, transparent 25%) -9px 0, linear-gradient(225deg, var(--ink) 25%, transparent 25%) -9px 0; background-size: 18px 18px; }
.ink .lede, .ink p { color: #ead9cf; }
.ink a { color: var(--amber); }
.ink .kicker { background: rgba(255, 255, 255, .14); color: var(--cream); }
.ink em.hl { color: var(--amber); }
.ink .src, .ink .src a { color: #b79ba0; }

/* ---------- headline lines rise one by one ---------- */
.lines span, h1.lines span { display: block; }
.lines span, h1.lines > span { opacity: 0; transform: translateY(.5em) rotate(-1deg); transition: opacity .7s var(--ease), transform .8s var(--ease); }
.lines.in span, h1.lines.in > span { opacity: 1; transform: none; }
.lines.in span:nth-child(2), h1.lines.in > span:nth-child(2) { transition-delay: .12s; }
h1.lines em.hl { display: block; opacity: 0; transform: translateY(.5em); transition: opacity .8s .26s var(--ease), transform .9s .26s var(--ease); }
h1.lines.in em.hl { opacity: 1; transform: none; }
.rv { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .8s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .lines span, h1.lines > span, h1.lines em.hl, .rv { opacity: 1 !important; transform: none !important; transition: none !important; } .needle { transition: none; } }

/* ---------- the ask ---------- */
.ch-ask { padding-top: clamp(60px, 10vw, 120px); min-height: 100svh; display: flex; align-items: center; }
.ch-ask h1 { font-size: clamp(2.3rem, 8.4vw, 6rem); max-width: 14ch; margin-bottom: .3em; }
.pin { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; margin: 34px 0 14px; }
.pinbox { position: relative; }
.digits { display: grid; grid-template-columns: repeat(6, clamp(42px, 11.5vw, 68px)); gap: clamp(6px, 1.6vw, 10px); }
.digits i { display: grid; place-items: center; aspect-ratio: .78; font: 700 clamp(1.7rem, 6vw, 2.8rem)/1 var(--mono); font-style: normal; background: var(--cream); border: 3px solid var(--ink); border-radius: 14px 18px 12px 20px; box-shadow: 4px 4px 0 var(--ink); transition: transform .14s var(--ease), background .2s; }
.digits i.f { background: var(--blush); transform: rotate(-2deg); }
.digits i.f:nth-child(even) { transform: rotate(1.5deg); }
.pinbox.on .digits i.cur { background: var(--amber); transform: translateY(-4px); }
.pinbox input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .01; font-size: 16px; cursor: text; }
.scrollcue { margin-top: 36px; color: var(--mute); font-size: .95rem; }
.scrollcue span { display: inline-block; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ---------- pick a seat ---------- */
.seatrow { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 22px; }
.seatrow button { display: flex; gap: 14px; align-items: center; text-align: left; background: var(--cream); border: 3px solid var(--ink); border-radius: 22px 28px 20px 26px; padding: 14px; cursor: pointer; box-shadow: 5px 5px 0 var(--ink); transition: transform .16s var(--ease), box-shadow .16s var(--ease); }
.seatrow button:hover, .seatrow button.on { transform: translate(-2px, -2px) rotate(-.5deg); box-shadow: 8px 8px 0 var(--pink); }
.mpa { border-radius: 50%; object-fit: cover; border: 3px solid var(--ink); flex: none; }
.mpa.ini { display: grid; place-items: center; background: var(--blush); font-weight: 700; }

/* ---------- the hire ---------- */
.hire-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; align-items: center; }
@media (min-width: 900px) { .hire-grid { grid-template-columns: 1.4fr 1fr; } }
.hire-name { font-size: clamp(2.6rem, 9vw, 6rem); line-height: .95; margin: .1em 0 .15em; overflow-wrap: anywhere; }
.sticker { display: inline-block; transform: rotate(-3deg); background: var(--amber); color: var(--ink); font-weight: 700; padding: 7px 16px; border-radius: 12px 18px 10px 16px; border: 3px solid var(--cream); margin-right: 8px; }
.hire-sub { font-size: clamp(1.05rem, 3.6vw, 1.5rem); color: #ead9cf; margin: 10px 0 0; overflow-wrap: anywhere; }
.sticker + .hire-sub { display: inline; }
.hire-photo { justify-self: center; }
.hire-grid > * { min-width: 0; }
.hire-photo .mpa { width: clamp(150px, 34vw, 280px) !important; height: clamp(150px, 34vw, 280px) !important; max-width: 100%; border-color: var(--cream); box-shadow: 10px 10px 0 var(--pink); font-size: clamp(3rem, 9vw, 6rem); background: #2b171d; color: var(--cream); }
.margin-card { margin-top: 38px; border: 3px dashed rgba(254, 245, 236, .55); border-radius: 26px 32px 22px 30px; padding: clamp(18px, 4vw, 32px); }
.margin-card .big { font-size: clamp(2.6rem, 10vw, 6.4rem); line-height: 1; font-weight: 700; color: var(--amber); font-variant-numeric: tabular-nums; }
.margin-card .big small { font-size: .32em; color: var(--cream); letter-spacing: 0; margin-left: .3em; }
.margin-card p { margin: 10px 0 0; font-size: clamp(1.05rem, 3.4vw, 1.3rem); }
.flip { margin-top: 22px; font-size: clamp(1.1rem, 3.6vw, 1.45rem); }
.flip b { color: var(--amber); font-variant-numeric: tabular-nums; }

/* ---------- the receipts: promise threads ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font: 700 .72rem/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; margin: 6px 0 26px; color: var(--ink-2); }
.legend span::before { content: ""; display: inline-block; width: 26px; height: 6px; margin-right: 8px; vertical-align: middle; border-radius: 4px; background: repeating-linear-gradient(to right, currentColor 0 6px, transparent 6px 10px); }
.s-partial { color: var(--pink-deep); } .s-backwards { color: #c1121f; } .s-untested { color: var(--mute); }
.rgroup { margin: 40px 0 12px; font-size: clamp(1.3rem, 4vw, 1.8rem); }
.rgroup small { display: block; font: 400 .95rem/1.4 var(--font); color: var(--ink-2); margin-top: 6px; max-width: 60ch; }
.rcp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px 34px; padding: 26px 0; border-top: 3px solid var(--ink); }
@media (min-width: 860px) { .rcp { grid-template-columns: 1fr 1fr; align-items: start; } }
.rcp h4 { margin: 0 0 6px; font-size: clamp(1.25rem, 3.8vw, 1.7rem); line-height: 1.1; }
.rcp .made { font-size: .82rem; color: var(--mute); margin: 0; }
.rcp .made a { color: var(--mute); }
.rcp .rec { margin: 10px 0 0; color: var(--ink-2); }
.strand { position: relative; height: 26px; margin: 8px 0 10px; }
.strand::before { content: ""; position: absolute; left: 0; right: 30px; top: 10px; height: 6px; border-radius: 4px; background: repeating-linear-gradient(to right, rgba(20, 9, 12, .22) 0 8px, transparent 8px 13px); }
.strand i { position: absolute; left: 0; top: 10px; height: 6px; width: 0; max-width: calc(100% - 30px); border-radius: 4px; background: repeating-linear-gradient(to right, var(--c, var(--pink)) 0 8px, transparent 8px 13px); transition: width 1.5s var(--ease); }
.strand .end { position: absolute; top: 0; width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--ink); background: var(--c, var(--pink)); left: var(--end, 0); transform: translateX(-4px); transition: left 1.5s var(--ease); display: grid; place-items: center; font: 700 .8rem/1 var(--mono); color: var(--cream); }
.rcp.in .strand i { width: calc((100% - 30px) * var(--p, 0) / 100); }
.rcp.in .strand .end { left: calc((100% - 30px) * var(--p, 0) / 100); }
.st-partial { --c: var(--pink); } .st-backwards { --c: #c1121f; } .st-untested { --c: var(--mute); } .st-unclear { --c: var(--amber); } .st-nodata { --c: var(--mute); } .st-delivered { --c: var(--ok); }
.st-backwards .end::after { content: "✕"; }
.st-partial .end::after { content: "…"; }
.st-delivered .end::after { content: "✓"; }
.st-unclear .end::after { content: "?"; color: var(--ink); }
.st-untested .end { background: var(--paper); border-style: dashed; }
.st-nodata .end { background: repeating-linear-gradient(45deg, var(--paper) 0 4px, #e3cfc4 4px 8px); }
.st-backwards .end { animation: fray 1.8s ease-in-out infinite; }
@keyframes fray { 50% { transform: translateX(-4px) rotate(10deg); } }
.verdict { display: inline-block; font: 700 .8rem/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 7px 12px; border-radius: 999px; background: var(--c); color: var(--cream); border: 2px solid var(--ink); }
.st-untested .verdict, .st-nodata .verdict { color: var(--ink); background: var(--paper); border-style: dashed; }
.st-unclear .verdict { color: var(--ink); }
.honest { position: relative; margin: 26px 0 0; padding: 16px 20px 16px 22px; max-width: 70ch; border: 3px dashed var(--ink); border-left: 10px solid var(--pink); border-radius: 6px 22px 22px 6px; background: var(--cream); color: var(--ink); font-size: .98rem; }
.honest::before { content: "Honestly"; display: block; font: 700 .7rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--pink-deep); margin-bottom: 8px; }
.honest.big { font-size: clamp(1.02rem, 3.2vw, 1.2rem); }
.ink .honest { background: #231217; color: var(--cream); border-color: rgba(254, 245, 236, .5); border-left-color: var(--amber); }
.ink .honest::before { color: var(--amber); }
.honest a { color: var(--pink-deep); }
.ink .honest a { color: var(--amber); }

/* ---------- sworn ---------- */
.ch-sworn h2 { max-width: 16ch; }
.swornbox { display: grid; gap: 22px; }

/* ---------- the lineup ---------- */
.adder { position: relative; max-width: 460px; margin: 26px 0 18px; }
.adder input { width: 100%; padding: 15px 18px; border-radius: 999px; border: 3px solid var(--cream); background: #231217; color: var(--cream); font-size: 1rem; }
.adder input::placeholder { color: #b79ba0; }
.cres { position: absolute; z-index: 5; left: 0; right: 0; top: 56px; background: var(--cream); color: var(--ink); border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; box-shadow: 6px 6px 0 var(--pink); }
.cres button { display: block; width: 100%; text-align: left; padding: 11px 16px; background: none; border: 0; border-bottom: 2px solid var(--line); cursor: pointer; font-size: .95rem; }
.cres button:hover, .cres button:focus-visible { background: var(--blush); }
.cres button:last-child { border-bottom: 0; }
.lineup { display: grid; overflow-x: auto; padding: 8px 4px 20px; -webkit-overflow-scrolling: touch; }
.lrow { display: grid; grid-template-columns: 138px repeat(var(--n, 2), minmax(190px, 1fr)); align-items: stretch; min-width: max-content; }
.lrow > div { padding: 14px 14px; border-bottom: 2px solid rgba(254, 245, 236, .2); }
.lrow .lab { font: 700 .72rem/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #b79ba0; position: sticky; left: 0; background: var(--ink); z-index: 2; }
.lrow.head > div { border-bottom: 3px solid var(--cream); padding-bottom: 18px; }
.lh { display: flex; gap: 12px; align-items: center; }
.lh b { display: block; line-height: 1.1; font-size: 1.1rem; }
.lh small { color: #b79ba0; }
.lh .x { margin-left: auto; background: none; border: 2px solid #6b5358; color: #b79ba0; border-radius: 50%; width: 28px; height: 28px; cursor: pointer; flex: none; }
.cell-no { background: repeating-linear-gradient(45deg, transparent 0 7px, rgba(254, 245, 236, .09) 7px 14px); color: #b79ba0; font-size: .86rem; }
.cell-no a { font-size: .86rem; }
.cell-flag { color: var(--amber); font-weight: 700; }
.mbar { height: 10px; border-radius: 6px; background: repeating-linear-gradient(to right, var(--amber) 0 7px, transparent 7px 11px); margin-top: 8px; }
.cell-v { font-size: 1.15rem; font-variant-numeric: tabular-nums; }

/* ---------- job / leak / power / move ---------- */
.cols2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; margin: 26px 0; }
@media (min-width: 860px) { .cols2 { grid-template-columns: 1fr 1fr; } }
.tick { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.tick li { position: relative; padding-left: 36px; }
.tick li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--ok); color: var(--cream); font: 700 .8rem/1 var(--mono); }
.tick.x li::before { content: "⌂"; background: var(--ink); }
.bignums { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; margin: 34px 0; }
@media (min-width: 860px) { .bignums { grid-template-columns: repeat(3, 1fr); } }
.bn b { display: block; font-size: clamp(3rem, 10vw, 5.4rem); line-height: .95; color: var(--amber); font-weight: 700; font-variant-numeric: tabular-nums; }
.bn b small { font-size: .5em; }
.bn b i { font-style: normal; }
.bn span { display: block; margin: 10px 0 6px; max-width: 30ch; }
.bn a { font-size: .85rem; }
.margins { display: flex; align-items: flex-end; gap: 1px; height: 150px; margin: 30px 0 10px; }
.margins i { flex: 1; min-width: 1px; background: rgba(20, 9, 12, .3); height: var(--h); border-radius: 2px 2px 0 0; transform-origin: bottom; transform: scaleY(0); transition: transform .9s var(--ease); transition-delay: calc(var(--d) * 1ms); }
.margins.in i { transform: scaleY(1); }
.margins i.tight { background: var(--pink); }
.margins i.you { background: var(--amber); outline: 3px solid var(--ink); z-index: 2; }
.moves { list-style: none; counter-reset: m; padding: 0; margin: 32px 0; display: grid; gap: 22px; }
.moves li { counter-increment: m; position: relative; padding-left: 70px; font-size: clamp(1.05rem, 3.4vw, 1.25rem); }
.moves li::before { content: counter(m); position: absolute; left: 0; top: -4px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--pink); color: var(--cream); font: 700 1.4rem/1 var(--font); border: 3px solid var(--cream); transform: rotate(-6deg); }
.gaps { padding-left: 20px; display: grid; gap: 10px; max-width: 70ch; }
.ch-end { padding-bottom: 120px; }

/* ---------- the day: one dot per rape, at the average pace ---------- */
.ch-day { padding-top: clamp(70px, 11vw, 120px); }
.daybig { display: flex; align-items: flex-end; gap: clamp(14px, 3vw, 30px); margin: 4px 0 26px; }
.daybig b { font-size: clamp(6rem, 30vw, 15rem); line-height: .8; font-weight: 700; color: var(--amber); font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.daybig span { font-size: clamp(1.15rem, 4vw, 1.9rem); line-height: 1.1; padding-bottom: .2em; color: var(--cream); font-weight: 700; }
.dotgrid { display: grid; grid-template-columns: repeat(9, 1fr); gap: clamp(7px, 1.6vw, 14px); max-width: 520px; margin: 0 0 26px; }
.dotgrid i { aspect-ratio: 1; border-radius: 50%; border: 3px solid rgba(254, 245, 236, .28); transform: scale(.4); opacity: 0; transition: transform .5s var(--ease), opacity .5s, background .4s, border-color .4s; transition-delay: calc(var(--k, 0) * 12ms); }
.dotgrid.in i { transform: none; opacity: 1; }
.dotgrid i.on { background: var(--pink); border-color: var(--pink); }
.dotgrid i.next { border-color: var(--amber); animation: nextdot 1.3s ease-in-out infinite; }
@keyframes nextdot { 50% { background: rgba(243, 176, 35, .55); transform: scale(1.12); } }
.gapline { font-size: clamp(1.7rem, 7vw, 3.4rem); font-weight: 700; line-height: 1; margin: 0 0 12px; color: var(--cream); }
.fine { font-size: .9rem; max-width: 60ch; color: var(--mute); }
.ink .fine, .ink .fine a { color: #c9b0b5; }
.ink .fine b { color: var(--cream); }

/* ---------- where it is registered ---------- */
.bars { display: grid; gap: 12px; margin: 26px 0 8px; max-width: 760px; }
.bar-row { display: grid; grid-template-columns: minmax(96px, 150px) 1fr auto; gap: 12px; align-items: center; }
.bar-row .bl { font-weight: 700; font-size: .95rem; }
.bar-row .bt { height: 22px; border-radius: 12px; background: repeating-linear-gradient(to right, rgba(20, 9, 12, .12) 0 8px, transparent 8px 13px); overflow: hidden; }
.bar-row .bt i { display: block; height: 100%; width: 0; border-radius: 12px; background: repeating-linear-gradient(to right, var(--pink) 0 8px, rgba(245, 39, 88, .35) 8px 13px); transition: width 1.2s var(--ease); transition-delay: var(--d, 0ms); }
.bars.in .bt i { width: var(--w); }
.bar-row .bv { font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---------- two people ---------- */
.duo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 28px; }
@media (min-width: 760px) { .duo { grid-template-columns: 1fr 1fr; } }
.who { border: 3px solid var(--cream); border-radius: 26px 32px 22px 30px; padding: 26px; }
.who svg { width: 64px; height: 64px; color: var(--amber); }
.who h3 { margin: 12px 0 10px; font-size: clamp(1.8rem, 6vw, 2.6rem); }
.who ul { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; font-size: 1.05rem; }
.who ul li::before { content: "→ "; color: var(--pink); font-weight: 700; }
.who small { color: #c9b0b5; font-size: .92rem; }

/* ---------- the record, tucked away ---------- */
details.why { margin-top: 12px; }
details.why summary { cursor: pointer; font: 700 .78rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--pink-deep); }
details.why p { margin: 10px 0 0; color: var(--ink-2); font-size: .95rem; }
.tightkey { color: var(--pink); font-weight: 700; }
.ch-end details summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; }
.ink .gaps { color: #ead9cf; }
.moves li b { display: block; font-size: clamp(1.25rem, 4.4vw, 1.7rem); line-height: 1.1; margin-bottom: 4px; }
.ch-where, .ch-leak, .ch-move { padding-bottom: clamp(60px, 10vw, 120px); }
