/* How to Play guide: figures and compact layout. Colours and fonts come from style.css. */
.guide .g-one { font-family: var(--type); margin: 4px 0 8px; }
.guide .g-quick .g-one { font-size: 1.02rem; }
.guide .g-bullets { margin-top: 10px; }
.guide .g-scroll { overflow-x: auto; }
.guide .g-scroll table { min-width: 460px; }
.guide td small, .guide th small { font-weight: 400; opacity: .75; }
.guide .g-req { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border: 1.5px solid currentColor; padding: 0 4px; margin-left: 2px; white-space: nowrap; }
.guide .toc { margin: 4px 0 8px; }
.guide figure { margin: 10px 0 12px; }
.guide figcaption, .guide .gm-note { font-size: .82rem; color: var(--ink-2); margin: 6px 0 0; }
details.g-more.g-sub { border: 0; border-top: 1px dashed var(--line); margin-top: 6px; }
details.g-more.g-sub > summary h3 { font-size: 1rem; }

/* The round loop: five steps, then back to the start */
.g-loop { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; padding: 0 0 22px !important; margin: 14px 0 4px; position: relative; }
.g-loop li { counter-increment: step; position: relative; margin: 0 !important; border: 2.5px solid var(--line); background: var(--field); padding: 18px 6px 6px; text-align: center; line-height: 1.15 !important; }
.g-loop li::before { content: counter(step); position: absolute; top: -11px; left: 50%; transform: translateX(-50%); width: 20px; height: 20px; border-radius: 50%; background: var(--red); color: var(--paper); font-family: var(--display); font-size: .8rem; line-height: 20px; }
.g-loop li:not(:last-child)::after { content: ''; position: absolute; right: -13px; top: 50%; border: 6px solid transparent; border-left: 8px solid var(--ink); transform: translateY(-50%); }
.g-loop b { display: block; font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .03em; font-size: 1rem; }
.g-loop small { display: block; font-size: .74rem; color: var(--ink-2); margin-top: 3px; }
.g-loop li:nth-child(3) { background: var(--ink); color: var(--paper); }
.g-loop li:nth-child(3) small { color: var(--paper); opacity: .8; }
.g-loop::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: 8px; height: 12px; border: 2px solid var(--ink); border-top: 0; }
.g-loop-next { text-align: center; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin: -6px 0 10px; }

/* The meters strip: start value as fill, thresholds as ticks */
.g-meters { margin: 22px 0 4px; display: grid; gap: 30px; }
.gm { display: grid; grid-template-columns: 78px 1fr 74px; align-items: center; gap: 8px; }
.gm-n { font-family: var(--display); text-transform: uppercase; letter-spacing: .03em; font-size: .9rem; }
.gm-k { font-size: .74rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.gm-bar { position: relative; height: 14px; border: 2px solid var(--line); background: var(--paper-2); }
.gm-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); }
.gm.bad .gm-bar i { background: var(--red); }
.gm-bar em { position: absolute; top: -5px; height: 18px; border-left: 2px solid var(--mustard); font-style: normal; font-size: .66rem; font-weight: 700; line-height: 1; white-space: nowrap; color: var(--ink-2); padding: 22px 0 0 2px; }
.gm-bar em.gm-lose { border-left: 3px solid var(--red); color: var(--red); }
.gm-bar em.gm-up { top: -19px; height: 32px; padding: 0 0 0 2px; }
.gm-bar em.gm-left { transform: translateX(-100%); border-left: 0; border-right: 2px solid var(--mustard); padding: 22px 2px 0 0; }
.gm-bar em.gm-end { transform: translateX(-100%); border-left: 0; border-right: 3px solid var(--red); padding: 22px 2px 0 0; }

/* How the odds are built */
.g-odds { border: 2.5px solid var(--line); background: var(--field); padding: 10px 12px; }
.go-row { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 8px; margin: 4px 0; }
.go-l { font-family: var(--display); text-transform: uppercase; font-size: .82rem; letter-spacing: .03em; }
.go-bar { display: flex; height: 24px; }
.go-bar i { display: flex; align-items: center; justify-content: center; font-style: normal; font-size: .74rem; font-weight: 700; color: var(--paper); border: 1.5px solid var(--line); margin-right: -1.5px; overflow: hidden; white-space: nowrap; min-width: 0; }
.go-s, .go-m, .go-u, .go-x { background: var(--green); }
.go-m { filter: brightness(.85); }
.go-u { filter: brightness(1.15); }
.go-x { background: var(--mustard); color: var(--ink) !important; }
.go-r, .go-h, .go-o { background: var(--red); }
.go-h { filter: brightness(.85); }
.go-o { filter: brightness(.7); }
.go-bar i.go-gap { background: transparent; border-color: transparent; }
.go-bar i.go-t { background: var(--ink); color: var(--paper); }
.go-res { border-top: 2px dashed var(--line); padding-top: 3px; height: 27px; }

/* Influence scale */
.gi-bar { position: relative; height: 16px; border: 2px solid var(--line); background: linear-gradient(90deg, var(--paper-2), var(--ink)); margin: 4px 0 28px; }
.gi-bar i { position: absolute; top: -6px; bottom: -6px; border-left: 3px solid var(--mustard); font-style: normal; }
.gi-bar i { font-size: .72rem; white-space: nowrap; color: var(--ink-2); }
.gi-bar i b { color: var(--ink); }
.gi-bar i { padding-top: 26px; }
.gi-keep { transform: translateX(-100%); text-align: right; border-left: 0 !important; border-right: 3px dashed var(--mustard); padding-right: 4px; }
.gi-hold { padding-left: 4px; }
.gi-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gi-chips span { font-size: .78rem; font-weight: 700; border: 2px solid var(--green); color: var(--green); padding: 1px 7px; }
.gi-chips span.neg { border-color: var(--red); color: var(--red); }

/* Palace stance scale */
.g-stance { display: grid; grid-template-columns: 20fr 40fr 40fr; margin: 10px 0 6px; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.g-stance span { border: 2px solid var(--line); margin-right: -2px; padding: 3px 6px; }
.st-b { background: var(--red); color: var(--paper); }
.st-w { background: var(--paper-2); }
.st-l { background: var(--ink); color: var(--paper); text-align: right; }

@media (max-width: 620px) {
  .g-loop { gap: 8px; }
  .g-loop li { padding: 16px 2px 5px; }
  .g-loop li:not(:last-child)::after { right: -9px; border-width: 4px; border-left-width: 6px; }
  .g-loop b { font-size: .78rem; }
  .g-loop small { display: none; }
  .gm { grid-template-columns: 66px 1fr; }
  .gm-k { display: none; }
  .guide th, .guide td { padding: 4px 5px; }
}
