/* CaseModel website: css/p-playbook.css
   Dynamic Playbook's own two worked examples: the proceedings filing by filing, and the notice to admit with its two outcomes. */

/* ---- the proceedings, as numbered circles joined by a line ---- */
.pb-top { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 32px; padding: 24px clamp(18px, 2.4vw, 28px) 18px; border-bottom: 1px solid var(--line-2); background: var(--sky-1); }
.pb-line { flex: 1 1 560px; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.pb-line li { position: relative; }
.pb-line li::after { content: ''; position: absolute; top: 19px; left: 40px; right: 0; height: 2px; background: var(--azure); }
.pb-line li:last-child::after { left: 40px; right: auto; width: 34px; background: repeating-linear-gradient(90deg, var(--edge) 0 6px, transparent 6px 11px); }
.pb-line button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 44px; padding: 0 10px 4px 0; border: 0; background: none; text-align: left; }
.pb-line i { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 8px; border-radius: 50%; background: #fff; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); font: 700 17px/1 var(--display); font-style: normal; position: relative; z-index: 1; transition: background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease); }
.pb-line b { font: 700 16.5px/1.2 var(--display); color: var(--navy); letter-spacing: -.01em; }
.pb-line span { font: 600 14px/1.2 var(--display); color: var(--text-3); }
.pb-line button:hover i { background: var(--sky-3); }
.pb-line button[aria-pressed="true"] i { background: var(--navy); color: #fff; box-shadow: 0 0 0 5px var(--sky-4); }
.pb-line button[aria-pressed="true"] b { color: var(--azure-dd); }
.pb-today { flex: 0 0 auto; margin: 4px 0 0; padding-left: 16px; border-left: 2px solid var(--azure); }
.pb-today b { display: block; font: 700 15.5px/1.3 var(--display); color: var(--navy); }
.pb-today span { display: block; margin-top: 3px; font-size: 14.5px; color: var(--text-3); }

/* ---- what the filing changed: its moves, and the claim beside them ---- */
.pb-body { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.pb-moves { padding: clamp(22px, 3vw, 36px); }
.pb-k { margin: 0 0 8px; font: 700 12.5px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.pb-h { font-size: clamp(22px, 2vw, 28px); }
.pb-meant { margin: 6px 0 0; font-size: 17px; color: var(--text-2); }
.pb-list { list-style: none; margin: 18px 0 0; padding: 0; counter-reset: mv; }
.pb-mv { counter-increment: mv; position: relative; padding: 14px 0 14px 40px; border-top: 1px solid var(--line-2); }
.pb-mv::before { content: counter(mv); position: absolute; left: 0; top: 15px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font: 700 13.5px/1 var(--display); }
.pb-mv-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; }
.pb-mv-h b { font: 700 17px/1.3 var(--display); color: var(--navy); letter-spacing: -.01em; }
.pb-mv dl { display: flex; flex-wrap: wrap; gap: 6px 26px; margin: 8px 0 0; }
.pb-mv dl div { display: flex; align-items: baseline; gap: 8px; }
.pb-mv dt { font: 700 12px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.pb-mv dd { margin: 0; font: 600 15px/1.3 var(--display); color: var(--text); }
.pb-body.swap .pb-mv { animation: pb-in .45s var(--ease) both; }
.pb-body.swap .pb-mv:nth-child(2) { animation-delay: .06s; } .pb-body.swap .pb-mv:nth-child(3) { animation-delay: .12s; } .pb-body.swap .pb-mv:nth-child(4) { animation-delay: .18s; }
@keyframes pb-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pb-body.swap .pb-mv { animation: none; } }

.pb-claim { padding: clamp(22px, 3vw, 36px); border-left: 1px solid var(--line-2); background: var(--sky-1); }
.pb-fig { margin-top: 18px; }
.pb-fig b { display: inline-block; font: 800 clamp(34px, 3.4vw, 48px)/1 var(--display); color: var(--navy); letter-spacing: -.035em; }
.pb-fig .pb-q { background: linear-gradient(var(--gold), var(--gold)) 0 92% / 100% 30% no-repeat; padding: 0 4px; margin-left: -4px; }
.pb-fig span { display: block; margin-top: 8px; font-size: 15px; line-height: 1.35; color: var(--text-3); }
.pb-fig strong { display: block; font: 700 15.5px/1.3 var(--display); color: var(--navy); }
.pb-bar { position: relative; margin-top: 22px; height: 14px; border-radius: 7px; background: var(--gold-bg); box-shadow: inset 0 0 0 1px var(--gold-l); overflow: hidden; }
.pb-bar i { position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: 7px; background: var(--navy); transition: width .7s var(--ease); }
.pb-change { margin: 16px 0 0; padding: 12px 14px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-size: 15.5px; line-height: 1.45; color: var(--text); }

@media (max-width: 900px) {
  .pb-body { grid-template-columns: minmax(0, 1fr); }
  .pb-claim { border-left: 0; border-top: 1px solid var(--line-2); }
}
@media (max-width: 640px) {
  .pb-line { flex-basis: 100%; }
  .pb-line li::after { left: 36px; top: 17px; }
  .pb-line i { width: 36px; height: 36px; font-size: 15.5px; }
  .pb-line b { font-size: 14px; }
  .pb-line span { font-size: 12.5px; }
  .pb-line li:last-child::after { display: none; }
  .pb-today { padding-left: 12px; }
  .pb-mv { padding-left: 38px; }
  /* a long reference wraps inside its chip rather than running out of the frame */
  .pb-mv dl div { flex-wrap: wrap; row-gap: 4px; }
  .pb-mv dd { min-width: 0; }
  .pb-mv cite { display: inline-block; white-space: normal; line-height: 1.3; }
}
/* phones: the four filings run down the frame, each circle joined to the next by a line, its name and date beside it */
@media (max-width: 480px) {
  .pb-line { grid-template-columns: minmax(0, 1fr); }
  .pb-line li { padding-bottom: 8px; }
  .pb-line li:last-child { padding-bottom: 0; }
  .pb-line li::after { top: 40px; bottom: -4px; left: 17px; right: auto; width: 2px; height: auto; }
  .pb-line button { width: 100%; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 1px 12px; align-items: center; padding: 0; }
  .pb-line i { grid-row: 1 / span 2; margin-bottom: 0; }
  .pb-line b { align-self: end; font-size: 15px; }
  .pb-line span { align-self: start; font-size: 13px; }
}

/* ---- the notice to admit, and the fork ---- */
.nt { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 3.5vw, 48px); align-items: start; }
.nt-doc { padding: 22px 24px 24px; box-shadow: var(--sh-2); }
.nt-lead { font-size: 16.5px; color: var(--text-2); }
.nt-facts { margin: 14px 0 0; padding-left: 24px; }
.nt-facts li { padding: 10px 0 12px 4px; border-bottom: 1px solid var(--line-2); font-size: 17px; line-height: 1.45; }
.nt-facts li::marker { font: 700 15px var(--display); color: var(--navy); }
.nt-facts p { margin: 0; }
.nt-c { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px !important; }
.nt-o { display: none; }
.nt-doc[data-fork="admit"] .nt-o, .nt-doc[data-fork="refuse"] .nt-o { display: inline-flex; animation: pb-in .4s var(--ease) both; }
.nt-doc[data-fork="admit"] .nt-o { color: var(--navy); background: #fff; box-shadow: inset 0 0 0 1.5px var(--navy); }
.nt-doc[data-fork="admit"] .nt-facts p:first-child { color: var(--text-3); }
.nt-rest { margin: 12px 0 0 !important; font-size: 15.5px; color: var(--text-3); }

.fork { padding: 20px 22px 22px; border: 1px solid var(--line); border-radius: var(--r-l); background: #fff; box-shadow: var(--sh-1); }
.fork-root { position: relative; margin: 0 auto; width: max-content; max-width: 100%; padding: 8px 14px; border-radius: 6px; background: var(--navy); color: #fff; font: 700 14.5px/1.2 var(--display); text-align: center; }
.fork-arms { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 38px; }
.fork-arms::before { content: ''; position: absolute; top: 0; left: 50%; width: 2px; height: 18px; background: var(--edge); }
.fork-arms::after { content: ''; position: absolute; top: 18px; left: 25%; right: 25%; height: 20px; border: 2px solid var(--edge); border-bottom: 0; border-radius: 8px 8px 0 0; }
.fork-arm { text-align: left; min-height: 44px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--sky-1); font-size: 16.5px; line-height: 1.4; color: var(--text); transition: border-color .2s, background .2s, box-shadow .2s, opacity .2s; }
.fork-arm b { font-family: var(--display); color: var(--navy); }
.fork-arm small { display: block; margin-top: 6px; font-size: 14.5px; line-height: 1.4; color: var(--text-3); }
.fork-arm:hover { border-color: var(--azure); }
.fork-arm[aria-pressed="true"] { background: #fff; border-color: var(--azure); box-shadow: 0 0 0 3px var(--sky-4), var(--sh-2); }
.fork.chosen .fork-arm[aria-pressed="false"] { opacity: .62; }
.nt-k { margin: 28px 0 12px; font: 700 12.5px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.nt-more li { margin-bottom: 14px; }
.nt-more b { display: block; font: 700 16.5px/1.35 var(--display); color: var(--navy); letter-spacing: -.005em; }
.nt-more span { display: block; margin-top: 3px; font-size: 15.5px; line-height: 1.45; color: var(--text-2); }
.nt-close { margin: clamp(32px, 4vw, 48px) 0 0; font: 700 clamp(22px, 2.2vw, 30px)/1.25 var(--display); color: var(--navy); letter-spacing: -.02em; }
@media (max-width: 900px) { .nt { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .fork { padding: 16px; }
  .fork-arms { grid-template-columns: 1fr; gap: 12px; padding-top: 24px; }
  .fork-arms::after { display: none; }
  .fork-arms::before { height: 24px; }
  .nt-doc { padding: 18px 16px 20px; }
}
