/* Only what is particular to this book. Shared: ../../assets/css/book.css, ../../assets/css/widgets.css. */

/* Only what is particular to this book; the rest is in ../../assets/css/book.css. */

:root{
  --ink:#1c1512; --parch:#f6eed6; --parch-lo:#e9dcb6; --marble:#eae4d4;
  --aegean:#2e88b5; --aegean-d:#136f9e; --blood:#bf4a26; --olive:#7c8f3a; --terra:#b5602c;
  --gold:#e0b84a; --shadow:#b9a77e;
  /* the five priests, as in the film */
  --pA:#e0b84a; --pB:#5b9be0; --pG:#e2564e; --pD:#9cb648; --pE:#b58be0;
  --serif:Georgia,'Iowan Old Style','Palatino Linotype',serif;
  --sans:Optima,'Gill Sans','Gill Sans MT',sans-serif;
}

#ballot{overflow:visible}

.req{font-size:1.5rem;margin:2rem 0 .5rem}

/* ---------- machines ---------- */
#machines .cols{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(24px,5vw,60px);align-items:center}

.terms{list-style:none;padding:0;margin:1.2rem 0 0;display:grid;gap:12px}

.logs{padding:18px 18px 12px}

.logs h4{font-family:var(--sans);margin:0 0 10px;font-size:.78rem;letter-spacing:.14em;text-transform:uppercase;color:#6b5a48}

.replicas{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}

.rep{border:3px solid var(--ink);padding:8px;background:#fff;min-height:210px;transition:opacity .4s,background .4s}

.rep.down{opacity:.38;background:#ddd}

.rep h5{margin:0 0 6px;font-family:var(--sans);font-size:.72rem;display:flex;justify-content:space-between;letter-spacing:.06em}

.rep .e{font-size:.78rem;padding:2px 6px;margin-bottom:3px;background:var(--parch-lo);border-left:4px solid var(--aegean);animation:slotin .4s ease both;font-family:var(--sans)}

.logs .note{font-size:.84rem;color:#6b5a48;margin:10px 0 0;min-height:2.6em;font-style:italic}

@media(max-width:760px){#machines .cols{grid-template-columns:1fr}}

/* on a phone, or a screen too short to hold them, the title and the notes leave the photograph and stand under it */
@media(max-width:900px),(max-height:720px){
  #hall{background:var(--parch);padding-bottom:clamp(2.5rem,8vw,4rem)}
  #hall .bleed{height:auto!important;overflow:visible;display:flex;flex-direction:column;gap:14px;padding:0 20px}
  .bleed::after{display:none}
  .bleed img{position:static;width:calc(100% + 40px);max-width:none;height:min(58svh,460px);margin:0 -20px;transform:none!important;
    -webkit-mask-image:linear-gradient(transparent,#000 9%);mask-image:linear-gradient(transparent,#000 9%)}
  .hall-title{position:relative;inset:auto;width:100%;max-width:640px;margin:-3.2rem auto 4px}
  .hall-title .t{display:block;max-width:none}
  .pins{position:static;display:contents}
  .pin,.pin:nth-child(n){width:100%;max-width:640px;margin:0 auto;box-shadow:5px 6px 0 var(--shadow);transform:none}
  .pin::before{display:none}
}

/* ballot diagram */
.fig .pr circle.body{stroke-width:4}

.fig .pr text{font-family:var(--sans);font-weight:700;font-size:22px;text-anchor:middle;dominant-baseline:central;fill:#1c1512}

.fig .lab{fill:#6b5a48;font-size:17px;font-style:italic;text-anchor:middle}

.fig .tag rect{fill:#f6e3a8;stroke:#1c1512;stroke-width:2;rx:6}

.fig .tag text{fill:#1c1512;font-size:16px;text-anchor:middle;dominant-baseline:central}

.fig .tok{transition:transform 1s cubic-bezier(.5,0,.2,1),opacity .5s}

.fig .reply rect{fill:#f3ead0;stroke:#1c1512;stroke-width:2;rx:6}

.fig .reply text{fill:#1c1512;font-size:17px;dominant-baseline:central}

.fig .reply.hi rect{stroke:#5f6e28;stroke-width:4;fill:#e3ecc4}

.fig .ring{fill:none;stroke:#136f9e;stroke-width:4;opacity:0;transition:opacity .6s}

.fig .ring.on{opacity:1}

.fig .dim{opacity:.35}

.well h4{font-family:var(--sans);font-size:.74rem;letter-spacing:.16em;text-transform:uppercase;margin:0 0 12px;color:var(--blood);display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 10px}

/* scrolls */
.scrollsrow{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}

.scr{background:#fff;border:3px solid var(--ink);padding:8px 6px;text-align:center;font-size:.8rem;min-height:92px;position:relative;transition:background .4s,border-color .4s}

.scr h5{margin:0 0 5px;font-family:var(--sans);font-size:.7rem;letter-spacing:.1em;color:#6b5a48}

.scr .d{font-style:italic;animation:slotin .4s both}

.scr.clash{background:#fde0d4;border-color:var(--blood)}

@media(max-width:560px){.scrollsrow{grid-template-columns:repeat(2,1fr)}}

/* messenger */
.lane{position:relative;height:130px;margin:6px 0}

.lane svg{width:100%;height:100%}

.tally{display:flex;gap:18px;flex-wrap:wrap;font-family:var(--sans);font-size:.85rem;margin-top:8px}

.tally span b{font-size:1.2rem;margin-right:4px}

/* majorities */
.hall-svg{width:min(100%,440px);display:block;margin:0 auto}

.seat{cursor:pointer;transition:transform .5s cubic-bezier(.3,1.4,.5,1)}

.seat circle.b{stroke:var(--ink);stroke-width:4;transition:fill .4s,opacity .4s}

.seat text{font-family:var(--sans);font-weight:700;font-size:17px;text-anchor:middle;dominant-baseline:central;pointer-events:none}

.seat.out circle.b{opacity:.3;fill:#ccc}

.seat:focus-visible{outline:none}

.seat:focus-visible circle.b{stroke:var(--aegean-d);stroke-width:7}

.ms tbody tr:focus-visible,.btn:focus-visible,.links a:focus-visible{outline:3px solid var(--aegean-d);outline-offset:2px}

.seat .ringA{stroke:var(--pB)}

.seat .ringB{stroke:var(--pG)}

.seat .mr{fill:none;stroke-width:6;opacity:0;transition:opacity .4s}

.seat.inA .ringA{opacity:1}

.seat.inB .ringB{opacity:1}

.seat .glow{fill:none;stroke:var(--gold);stroke-width:7;opacity:0}

.seat.both .glow{opacity:1;animation:pulse 1.2s infinite}

@keyframes pulse{50%{stroke-width:13;opacity:.5}}

.seat text.lbl{font-family:var(--sans);font-size:11px;font-weight:400;fill:#1c1512}

.seat.clash text.lbl{fill:#bf4a26;font-weight:700}

.seat.clash circle.b{stroke:#bf4a26}

.seat .ink{fill:var(--ink);opacity:0;transition:opacity .4s}

.seat.knows .ink{opacity:1}

/* manuscript */
.ms table{width:100%;border-collapse:collapse;font-size:.95rem}

.ms th{font-family:var(--sans);font-size:.7rem;letter-spacing:.12em;text-transform:uppercase;text-align:left;padding:4px 8px;color:#6b5a48}

.ms td{padding:7px 8px;border-top:2px solid #1c151222}

.ms tr.sel{background:#fbe9b4}

.ms tbody tr{cursor:pointer}

.ms tbody tr:hover{background:#f6e7bd}

.pc{display:inline-block;min-width:30px;text-align:center;margin:1px 3px 1px 0;padding:1px 4px;font-family:var(--sans);font-weight:700;border:2px solid transparent;border-radius:4px}

.pc.v{border-color:var(--ink);background:#fff}

.pc.hl{background:var(--gold)!important;box-shadow:0 0 0 3px var(--gold)}

.pc.dec{color:var(--blood);font-style:italic}

.ms .explain{padding:12px 14px;margin-top:12px;background:#fff;border:3px solid var(--ink);font-size:.97rem;min-height:5.2em}

/* president duel */
.duel{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start}

.duel .stat{font-family:var(--sans);font-size:.85rem}

.duel .stat b{font-size:1.5rem;display:block}

.dlog{font-size:.88rem;max-height:210px;overflow:auto;margin-top:10px;padding:8px 12px;background:#fff;border:3px solid var(--ink);font-family:var(--sans)}

.dlog div{padding:2px 0;border-bottom:1px dotted #1c151233}

@media(max-width:700px){.duel{grid-template-columns:1fr}}

/* decree row */
.slots{display:grid;grid-template-columns:repeat(9,1fr);gap:6px;margin:6px 0}

.slot{min-height:84px;border:3px dashed #1c151255;padding:5px 3px;text-align:center;font-size:.7rem;line-height:1.15;background:#ffffff80;transition:all .5s;position:relative}

.slot b{display:block;font-family:var(--sans);font-size:.78rem;margin-bottom:3px}

.slot.has{border:3px solid var(--ink);background:#fff;border-style:solid}

.slot.gap{border-color:var(--blood);background:#fde8de;animation:pulse2 1.3s infinite}

.slot.fill{border-color:var(--olive);background:#eef3d8;border-style:solid}

@keyframes pulse2{50%{background:#fbcfbc}}

.slot.new{animation:slotin .6s both}

@media(max-width:640px){.slots{grid-template-columns:repeat(3,1fr)}}

/* president's scroll, drawn inside the hall svg */
.fig .row rect{fill:#fffaf0;stroke:#1c1512;stroke-width:3}

.fig .row rect.future{fill:none;stroke-dasharray:6 6;stroke-opacity:.35}

.fig .row rect.gap{fill:#fde8de;stroke:#bf4a26;animation:pulse2 1.3s infinite}

.fig .row rect.fill{fill:#eef3d8;stroke:#5f6e28}

/* opacity only: a CSS transform here would replace the row's translate attribute */
.fig .row.pop2{animation:rowin .6s both}

.fold{display:flex;align-items:center;gap:6px;height:58px;margin-top:10px;overflow:hidden}

.fold .e{flex:0 1 6px;height:44px;background:var(--aegean);opacity:.8;transition:all .8s}

.fold .e.gone{flex-basis:0;opacity:0;margin-right:-6px}

.fold .digest{flex:0 0 0;overflow:hidden;white-space:nowrap;opacity:0;font-size:.82rem;font-family:var(--sans);background:var(--gold);border:3px solid var(--ink);padding:6px 0;transition:all .8s}

.fold.folded .digest{flex:0 1 290px;opacity:1;padding:6px 10px;text-overflow:ellipsis}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .pop > .leaf{transition:opacity .3s;transform:none!important}
  [data-depth]{transform:none!important}
  .slot.gap,.fig .row rect.gap,.seat.both .glow{animation:none}
  .fig .tok{transition:none}
}

/* lineage.css */
/* ---------- lineage: the papers a book's papers draw on and lead to (lineage.py) ---------- */
.lin{--gap:134px;position:relative;margin-top:1.2rem}

/* end lineage.css */
