/* /rulebook: the styles the site's CSS doesn't have, from the page handoff (design/rulebook-page/rulebook.css),
   only the rules this page uses. Generated by scripts/rulebook/extract.py: regenerate, do not edit by hand. */
/* Hero: the home hero layout (copy left, red panel to the edge). */
.rbp-hero .fx-label.eyebrow{margin-bottom:calc(-1 * var(--space-3))}
/* The red panel: an open Rulebook, not the home seal morph. Pages are drawn in hairlines on the red
   (no second ground: each page is filled with the red itself). Draft pages carry dotted lines, settled
   pages solid ones. The end state is the default; the animation only plays the way there, so reduced
   motion (animation: none) and no-animation browsers show the signed spread. */
.bk{position:relative;width:min(100%,460px);aspect-ratio:46/30;perspective:1800px;transform-style:preserve-3d;border:1px solid var(--line-strong)}
.bk::after{content:"";position:absolute;left:50%;top:0;bottom:0;border-left:1px solid var(--line-strong)}
.bk__page,.bk__leaf{position:absolute;top:0;width:50%;height:100%}
/* One 3D context: depth, not paint order, stacks the leaves, so the leaf turning now is on top. */
.bk__page{transform:translateZ(-8px)}
.bk__page--l{left:0}
.bk__page--r{left:50%}
.bk__leaf{left:50%;transform-origin:left center;transform-style:preserve-3d;transform:rotateY(-180deg) translateZ(calc(var(--i) * -2px))}
.bk__f,.bk__b{position:absolute;inset:0;background:var(--surface-page);backface-visibility:hidden;-webkit-backface-visibility:hidden}
.bk__f{border-left:1px solid var(--line-strong)}
.bk__b{transform:rotateY(180deg);border-right:1px solid var(--line-strong)}
.bk__ln{position:absolute;inset:14% 13% auto;display:grid;gap:clamp(10px,3.2vw,16px)}
.bk__ln i{display:flex;align-items:center;gap:8px;width:var(--w);height:6px}
.bk__ln i::before{content:"";flex:none;width:6px;height:6px;background:var(--text)}
.bk__ln i::after{content:"";flex:1;border-top:1.5px solid var(--text)}
.bk__ln i:first-child{height:10px}
.bk__ln i:first-child::after{border-top-width:3px}
.bk__ln--draft i::before{background:none;outline:1px dotted var(--text-muted);outline-offset:-1px}
.bk__ln--draft i::after{border-top:2px dotted var(--text-muted)}
.bk__seal{position:absolute;right:10%;bottom:9%;width:28%;height:auto}
/* The rest of the panel: the white grain seal cropped off the corner (DESIGN.md §5, white on red,
   0.5 behind), the page block under the spread, and the caption stepping with the turn. */
.rbp-hero .hero__panel{position:relative;overflow:hidden}
.rbp-hero .hero__panel::before{content:"";position:absolute;right:0;bottom:0;width:min(60vw,440px);aspect-ratio:1;background:url("/v2/design/assets/grain/grain-seal-white-720.png") center/contain no-repeat;transform:translate(52%,52%);opacity:.5;image-rendering:pixelated;pointer-events:none}
.bk-fig{position:relative;display:grid;justify-items:center;gap:var(--space-8);width:min(100%,460px)}
.bk-fig .bk{width:100%}
.bk__edge{position:absolute;inset:0;border:1px solid var(--line);transform:translate(5px,5px) translateZ(-12px)}
.bk__edge--2{transform:translate(10px,10px) translateZ(-14px)}
.bk__cap{color:var(--text)}
@media (min-width:1000px){.bk-fig{width:min(100%,540px)}}
@media (prefers-reduced-motion:no-preference){.bk__leaf{animation:bk-turn 760ms cubic-bezier(.6,0,.2,1) calc(500ms + var(--i) * 520ms) backwards}.bk__seal{animation:bk-seal 320ms var(--ease) 2.4s backwards}}
@keyframes bk-turn{from{transform:rotateY(0) translateZ(calc(var(--i) * -2px))}}
@keyframes bk-seal{from{opacity:0;transform:scale(1.25)}}
/* Definition: a dictionary entry under the hero. Rail-aligned with the sections below. */
.def{padding-block:var(--space-12);border-top:1px solid var(--line)}
.def__in{display:grid;gap:var(--space-4)}
.def__term{display:flex;align-items:baseline;gap:var(--space-3);font-family:var(--font-display);font-size:34px;line-height:1}
.def__pos{font-style:italic;font-size:18px;color:var(--text-muted)}
.def__text{font-family:var(--font-display);font-size:22px;line-height:1.3;max-width:44ch;text-wrap:pretty}
@media (min-width:1000px){.def{padding-block:var(--space-16)}.def__in{grid-template-columns:320px minmax(0,1fr);gap:0;align-items:baseline}.def__term{font-size:40px;padding-right:var(--space-8)}.def__text{padding-left:var(--space-12);font-size:30px;line-height:1.25}}
/* Why it exists: one stage, four steps (src/js/pin.js). Documents are white sheets with a hairline,
   the unwritten source dashed (DESIGN.md §6 diagrams). Sheets sit on a container (cqw units) so the
   scene scales with the column. The default is the problem (two sheets in conflict, an unsigned
   draft); pinned, the steps walk there and on to the sealed Rulebook. */
.case__h{font-family:var(--font-display);font-size:28px;line-height:1.12;font-weight:400;text-wrap:balance}
.why__rails{row-gap:var(--space-8)}
.why__stage{display:grid;gap:var(--space-4);align-content:center;min-width:0}
.wst{position:relative;container-type:inline-size;width:100%;height:auto;aspect-ratio:100/74}
.wst__sh{--x:0;--y:0;--r:0;--s:1;--o:1;position:absolute;left:0;top:0;width:42cqw;height:48cqw;display:grid;grid-template-rows:auto 1fr auto;gap:var(--space-2);padding:var(--space-3);background:var(--surface-raised);border:1px solid var(--line-strong);transform:translate(calc(var(--x) * 1cqw),calc(var(--y) * 1cqw)) rotate(calc(var(--r) * 1deg)) scale(var(--s));opacity:var(--o);transition:transform 560ms cubic-bezier(.16,1,.3,1),opacity 300ms var(--ease)}
.wst__sh--said{border-style:dashed}
.wst__h{display:flex;align-items:flex-start;gap:6px;font:600 10.5px/1.35 var(--font-sans);letter-spacing:.08em;text-transform:uppercase}
.wst__h .fx-icon{flex:none;margin-top:-3px}
.wst__ln{display:grid;align-content:start;gap:8px;padding-top:var(--space-2)}
.wst__ln i{display:block;height:0;border-top:1px solid var(--line)}
.wst__ln i:nth-child(2){width:80%}
.wst__ln i:nth-child(3){width:60%}
.wst__v{font-family:var(--font-display);font-size:clamp(22px,7cqw,34px);line-height:1;white-space:nowrap;font-variant-numeric:tabular-nums;transition:opacity 300ms var(--ease)}
.wst__tag{position:absolute;left:50%;top:27cqw;transform:translate(-50%,-50%);background:var(--text);border-color:var(--text);color:var(--surface-page);transition:opacity 300ms var(--ease)}
.wst__own{position:absolute;left:50%;top:66cqw;display:flex;align-items:center;gap:var(--space-3);transform:translateX(-50%);transition:opacity 300ms var(--ease)}
.wst__who{display:grid;place-items:center;width:32px;height:32px;border:1px dashed var(--text-muted);color:var(--text-muted)}
.wst__rb{position:absolute;left:0;top:0;display:grid;align-content:start;gap:var(--space-3);width:19cqw;height:23cqw;padding:var(--space-3);background:var(--surface-raised);border:1px solid var(--gold);transform:translate(40.5cqw,6.5cqw) scale(1.25);opacity:0;visibility:hidden;transition:opacity 300ms var(--ease),visibility 0s 300ms}
.wst__rb .wst__ln{padding:0}
.wst__rb img{width:28px;height:28px}
/* Default (phones, short screens, no script): Policy and Client manual side by side, in conflict. */
.wst__sh[data-k="pol"]{--x:4;--y:3;--r:-2}
.wst__sh[data-k="man"]{--x:54;--y:3;--r:2}
.wst__sh[data-k="pro"],.wst__sh[data-k="reg"],.wst__sh[data-k="tri"]{--x:29;--y:8;--o:0}
.why__caps{list-style:none;margin:0;padding:0;display:grid;border-top:1px solid var(--line)}
.why__cap{display:grid;gap:var(--space-2);align-content:start;padding:var(--space-6) 0;border-bottom:1px solid var(--line)}
.why__cap p:not(.say):not(.fx-label-s):not(.stat__n):not(.stat__t){color:var(--text-muted)}
.why__cap--end{gap:var(--space-6)}
.why__cap .fx-btn--quiet{justify-self:start;margin-top:var(--space-2)}
@media (min-width:1000px){.why__rails{grid-template-columns:320px minmax(0,1fr)}.why__stage{grid-column:2;grid-row:1 / span 2;padding-left:var(--space-12)}.why__caps{grid-column:1;grid-row:2;padding-right:var(--space-8);border-right:1px solid var(--line)}.why__rails .rail{grid-row:1}.wst{aspect-ratio:100/40}.wst__sh{width:19cqw;height:23cqw}.wst__sh[data-k="pol"]{--x:20;--y:5;--r:-2;--s:1.2}.wst__sh[data-k="man"]{--x:61;--y:5;--r:2;--s:1.2}.wst__sh[data-k="pro"]{--x:1;--y:12;--r:-6;--s:.9;--o:.35}.wst__sh[data-k="reg"]{--x:80;--y:12;--r:5;--s:.9;--o:.35}.wst__sh[data-k="tri"]{--x:5;--y:16;--r:5;--s:.85;--o:.35}.wst__tag{top:17cqw}.wst__own{top:35cqw}}
/* Pinned: the frame is as tall as its content (data-pin-fit); the caption swaps beside the rail. */
.pin-on :is(.why) .pin__stick{height:auto;align-items:flex-start;padding-block:var(--space-12)}
.pin-on .why__caps{display:grid;border:0;border-right:1px solid var(--line)}
.pin-on .why__cap{grid-area:1/1;border:0;padding:0}
.pin-on .why__cap .say{font-size:28px}
.pin-on .why__cap .tally{grid-template-columns:repeat(2,minmax(0,1fr));border-bottom:0}
.pin-on .why__cap .tally__i{padding:var(--space-4) var(--space-4) 0 0;border:0}
.pin-on .why__cap .tally__i + .tally__i{padding-left:var(--space-4);border-left:1px solid var(--line)}
.pin-on .why__cap .tally__i .stat__n{font-size:56px}
.pin-on .why__cap .stat__t{font-size:14px;line-height:1.45}
.pin-on .why .pin__nav{display:block}
/* Step 1: the rules in five places, scattered across the stage. */
.pin-on .why:has(.why__cap:nth-child(1).is-on) .wst__sh{--s:1;--o:1}
.pin-on .why:has(.why__cap:nth-child(1).is-on) .wst__sh[data-k="pol"]{--x:1;--y:8;--r:-7}
.pin-on .why:has(.why__cap:nth-child(1).is-on) .wst__sh[data-k="pro"]{--x:20.5;--y:3;--r:4}
.pin-on .why:has(.why__cap:nth-child(1).is-on) .wst__sh[data-k="reg"]{--x:40;--y:11;--r:-3}
.pin-on .why:has(.why__cap:nth-child(1).is-on) .wst__sh[data-k="man"]{--x:59.5;--y:4;--r:6}
.pin-on .why:has(.why__cap:nth-child(1).is-on) .wst__sh[data-k="tri"]{--x:79;--y:10;--r:-5}
.pin-on .why:has(.why__cap:nth-child(1).is-on) :is(.wst__v,.wst__tag){opacity:0}
/* Steps 1–2: nobody has signed anything yet. */
.pin-on .why:has(.why__cap:nth-child(-n+2).is-on) .wst__own{opacity:0}
/* Step 4: the sheets settle into one pile under the sealed Rulebook. */
.pin-on .why:has(.why__cap:nth-child(4).is-on) .wst__sh{--x:40.5;--r:0;--s:1.25;--o:1}
.pin-on .why:has(.why__cap:nth-child(4).is-on) .wst__sh[data-k="pol"]{--y:9}
.pin-on .why:has(.why__cap:nth-child(4).is-on) .wst__sh[data-k="pro"]{--y:8.5}
.pin-on .why:has(.why__cap:nth-child(4).is-on) .wst__sh[data-k="reg"]{--y:8}
.pin-on .why:has(.why__cap:nth-child(4).is-on) .wst__sh[data-k="man"]{--y:7.5}
.pin-on .why:has(.why__cap:nth-child(4).is-on) .wst__sh[data-k="tri"]{--y:7}
.pin-on .why:has(.why__cap:nth-child(4).is-on) :is(.wst__v,.wst__tag,.wst__own){opacity:0}
.pin-on .why:has(.why__cap:nth-child(4).is-on) .wst__rb{opacity:1;visibility:visible;transition:opacity 300ms var(--ease) 200ms,visibility 0s}
/* From real Rulebooks: two figures side by side. */
.tally{display:grid;border-top:1px solid var(--line)}
.tally__i{display:grid;gap:var(--space-2);align-content:start;padding:var(--space-6) 0;border-bottom:1px solid var(--line)}
.tally__i .stat__n{font-family:var(--font-display);font-size:64px;line-height:1;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.tally__i .stat__t{max-width:32ch;color:var(--text-muted)}
@media (min-width:700px){.tally{grid-template-columns:repeat(2,minmax(0,1fr));border-bottom:1px solid var(--line)}.tally__i{border-bottom:0;padding:var(--space-8) var(--space-6)}.tally__i:first-child{padding-left:0}.tally__i + .tally__i{border-left:1px solid var(--line)}}
@media (min-width:1000px){.tally__i .stat__n{font-size:88px}}
/* The two figures from real Rulebooks sit under the three rows. */
.why__proof{display:grid;gap:var(--space-3)}
.why__proof .fx-label-s{color:var(--text-muted)}
/* Swap the agent: each tile swaps once as the figure comes into view; the rules stay put. */
.tile__ok{transition:opacity 200ms var(--ease)}
.tile{transition:border-color 200ms var(--ease)}
.tile.is-swap{border-color:var(--gold)}
.tile.is-swap .tile__ok{opacity:0}
/* Security and trust: the shared Home section, three marks with the compliance logos. */
.mark__logo{display:block;width:34px;height:34px;background:var(--gold-text);-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}
@media (min-width:600px){.trust__marks{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:599px){.trust__marks .mark{min-height:0}.trust__marks .mark .fx-rule__foot{padding-top:var(--space-4)}}
/* Proof: two stats. */
.stat__t{max-width:30ch}
/* Yours to keep: copy above the rules-to-agents figure. */
.rbp-keep .t-body-l{max-width:52ch}
.rbp-keep .enf-fig{max-width:520px}
.rbp-keep .rls li{color:var(--text)}
.keep{display:grid;gap:var(--space-4);max-width:520px;margin:0}
.keep__book{border:1px solid var(--gold)}
.keep__book .rls{border:0;padding-top:var(--space-3)}
.keep__head{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-3) var(--space-4);border-bottom:1px solid var(--gold);font-family:var(--font-display);font-size:20px;line-height:1.2}
.keep__head img{flex:none}
.keep__head .fx-label-s{margin-left:auto;color:var(--gold)}
.keep .enf-fig__bus{height:48px}
.keep .enf-fig__bus::before{height:24px}
.keep .enf-fig__bus::after{top:23px;height:25px}
.keep__via{position:absolute;left:calc(50% + var(--space-3));top:3px;color:var(--gold)}
.keep__cap{max-width:44ch;font-size:15px;line-height:1.5;color:var(--text-muted)}

/* ---- Tap area (not in the handoff) ---- */
@media (max-width:999px),(pointer:coarse){.rbp-keep .fx-btn--quiet{position:relative}.rbp-keep .fx-btn--quiet::after{content:"";position:absolute;left:0;right:0;top:50%;height:44px;transform:translateY(-50%)}}
