/* CaseModel website: css/p-their-evidence.css
   Affidavit Scrutiny's own two worked examples: a sworn paragraph beside what answers it, in four kinds, and the findings by kind
   beside one witness's lines of questioning. */

.af-lab { margin: 0 0 10px; font: 700 12.5px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }

/* ---- four kinds of finding, as numbered steps joined by a line ---- */
.af-bar { padding: 18px clamp(18px, 2.4vw, 28px); border-bottom: 1px solid var(--line-2); background: var(--sky-1); }
.af-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; }
.af-steps li { position: relative; }
.af-steps li:not(:last-child)::after { content: ''; position: absolute; top: 31px; left: 58px; right: -8px; height: 2px; background: #9cc6ff; }
.af-steps button { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; background: none; text-align: left; transition: background .2s, border-color .2s, box-shadow .2s; }
.af-steps button:hover { background: #fff; }
.af-steps button[aria-pressed="true"] { background: #fff; border-color: var(--line); box-shadow: var(--sh-2); }
.af-n { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--navy); background: #fff; color: var(--navy); font: 700 17px/1 var(--display); transition: background .2s, color .2s; }
.af-steps button.seen .af-n, .af-steps button[aria-pressed="true"] .af-n { background: var(--navy); color: #fff; }
.af-steps b { font: 700 15.5px/1.2 var(--display); color: var(--navy); letter-spacing: -.01em; }
.af-steps button:not([aria-pressed="true"]) b { position: relative; z-index: 1; background: var(--sky-1); padding-right: 4px; }

.af-panel { padding: clamp(22px, 3vw, 40px); }
.af-cards { display: grid; grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr); align-items: center; }
.af-side .doc { box-shadow: var(--sh-2); }
.af-aff { border-left: 3px solid var(--navy); }
.af-para { display: flex; gap: 14px; margin: 0 !important; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.5; color: var(--text); }
.af-pn { flex: none; font: 700 15px/1.9 var(--display); color: var(--text-3); min-width: 22px; }
.af-at { margin: 14px 0 0 !important; }
.af-join { position: relative; align-self: stretch; display: grid; place-items: center; padding-top: 22px; }
.af-join::before { content: ''; position: absolute; left: 0; right: 0; top: calc(50% + 11px); height: 2px; background: var(--red); }
.af-join span { position: relative; max-width: 128px; padding: 6px 8px; border: 1.5px solid var(--red); border-radius: 6px; background: #fff; text-align: center; font: 700 13.5px/1.25 var(--display); color: var(--red-d); }
.af-why { margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--line-2); font-size: 17px; color: var(--text-2); max-width: 52em; }
.af-why b { display: inline; margin-right: 10px; font: 700 12.5px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.af-foot { display: flex; justify-content: flex-end; padding: 14px clamp(18px, 2.4vw, 28px); border-top: 1px solid var(--line-2); }
.af-foot .btn { min-height: 44px; }
/* on a phone the button's longer names wrap inside it */
@media (max-width: 560px) { .af-foot .btn { max-width: 100%; padding-top: 10px; padding-bottom: 10px; line-height: 1.25; text-align: center; white-space: normal; } }
.js .af-pair:not(.on) { display: none; }
.js .af-pair.on { animation: af-in .45s var(--ease) both; }
.af-pair + .af-pair { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
.js .af-pair + .af-pair { margin-top: 0; padding-top: 0; border-top: 0; }
@keyframes af-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .js .af-pair.on { animation: none; } }
html:not(.js) .af-foot { display: none; }

@media (max-width: 1000px) {
  .af-steps { grid-template-columns: 1fr 1fr; gap: 6px 14px; }
  .af-steps li::after { display: none; }
}
@media (max-width: 760px) {
  .af-steps { grid-template-columns: 1fr; gap: 0; }
  .af-steps li:not(:last-child)::after { display: block; top: 50px; bottom: -12px; left: 32px; right: auto; width: 2px; height: auto; }
  .af-steps button { min-height: 56px; padding: 8px 12px; }
  .af-steps button:not([aria-pressed="true"]) b { background: none; }
  .af-cards { grid-template-columns: 1fr; }
  .af-join { padding: 0; height: 64px; }
  .af-join::before { left: 50%; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .af-join span { max-width: none; }
}

/* ---- the findings by kind, and one witness's lines of questioning ---- */
.af-tally { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.af-kinds { padding: clamp(22px, 3vw, 40px); border-right: 1px solid var(--line-2); }
.af-bars { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.af-bars li { display: grid; grid-template-columns: 210px minmax(0, 1fr) 40px; gap: 14px; align-items: center; }
.af-bn { font: 600 15.5px/1.25 var(--display); color: var(--navy); }
.af-bt { display: block; height: 22px; }
.af-bt i { display: block; height: 100%; width: calc(var(--v) / 41 * 100%); border-radius: 3px; background: #f0b2a5; transform-origin: left center; transition: transform .9s var(--ease); }
.af-bars li:nth-child(2) .af-bt i { transition-delay: .06s; } .af-bars li:nth-child(3) .af-bt i { transition-delay: .12s; }
.af-bars li:nth-child(4) .af-bt i { transition-delay: .18s; } .af-bars li:nth-child(5) .af-bt i { transition-delay: .24s; } .af-bars li:nth-child(6) .af-bt i { transition-delay: .3s; }
.js #tally:not(.in) .af-bt i { transform: scaleX(0); }
.af-bars b { font: 800 19px/1 var(--display); color: var(--red-d); text-align: right; }
.af-sum { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: 16.5px; color: var(--text-2); }
.af-sum b { font: 800 18px/1 var(--display); color: var(--navy); }

.af-xx { padding: clamp(22px, 3vw, 40px); background: var(--sky-1); }
.af-xn { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; }
.af-xn b { font: 800 clamp(40px, 4vw, 56px)/1 var(--display); color: var(--navy); letter-spacing: -.035em; }
.af-xn span { font: 600 17px/1.2 var(--display); color: var(--text-2); }
.af-xq { list-style: none; margin: 0; padding: 0; counter-reset: xq; }
.af-xq li { position: relative; counter-increment: xq; padding: 0 0 16px 40px; margin-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.af-xq li::before { content: counter(xq); position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font: 700 13px/1 var(--display); }
.af-xq p { margin: 0 0 8px; font-size: 16.5px; line-height: 1.45; color: var(--text); }
.af-xq span { display: flex; flex-wrap: wrap; gap: 6px; }
.af-goes { margin: 4px 0 0; font: 600 16.5px/1.4 var(--display); color: var(--navy); }

@media (max-width: 900px) {
  .af-tally { grid-template-columns: 1fr; }
  .af-kinds { border-right: 0; border-bottom: 1px solid var(--line-2); }
}
@media (max-width: 560px) {
  .af-bars li { grid-template-columns: minmax(0, 1fr) 36px; gap: 4px 10px; }
  .af-bn { grid-column: 1 / -1; }
  .af-xq cite { white-space: normal; }
}
