/* Infinite scrolling lesson. All rules scoped under .isc-* */

.isc-hero { display: grid; place-items: center; }
.isc-hero img { width: 100%; max-height: 300px; object-fit: contain; }

/* the phone: a header count, a scrolling feed, a bar showing how far down */
.isc-phone { width: 100%; max-width: 300px; margin: 0 auto; border-radius: 22px; background: var(--surface); border: 1px solid var(--line-strong); padding: 8px 8px 10px; }
.isc-bar { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 8px 8px; font-size: 13px; font-weight: 700; color: var(--dim); }
.isc-n { font-family: var(--mono); font-size: 16px; color: var(--gold); display: inline-block; }
.isc-bump { animation: iscBump .45s; }
@keyframes iscBump { 40% { transform: scale(1.35); } }
.isc-win { position: relative; }
.isc-feed { height: 250px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding-right: 14px; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.isc-feed::-webkit-scrollbar { display: none; }
.isc-rail { position: absolute; right: 2px; top: 0; bottom: 0; width: 6px; border-radius: 3px; background: rgba(234, 227, 215, .08); }
.isc-rail i { position: absolute; left: 0; right: 0; border-radius: 3px; background: var(--gold); transition: height .25s, top .08s; }

.isc-post { padding: 8px; margin-bottom: 8px; border-radius: 14px; background: var(--raised); }
.isc-ph { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.isc-ph i { width: 20px; height: 20px; border-radius: 50%; flex: none; }
.isc-ph u { display: block; height: 7px; border-radius: 4px; background: rgba(234, 227, 215, .18); }
.isc-pic { height: 74px; border-radius: 10px; opacity: .85; }
.isc-old { opacity: .45; }

.isc-cue { display: grid; justify-items: center; gap: 4px; padding: 14px 8px 12px; margin: 4px 0 10px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); text-align: center; }
.isc-cue i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 18px; color: var(--mint); box-shadow: inset 0 0 0 2px var(--mint); }
.isc-cue b { font-size: 15px; }
.isc-cue span { font-size: 12px; color: var(--dim); }
.isc-oldh { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 0 0 8px 4px; }

/* the old way: pages and a Next button */
.isc-pages { width: 100%; max-width: 300px; margin: 0 auto; display: grid; gap: 10px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.isc-pg-t { font-size: 13px; font-weight: 700; color: var(--dim); }
.isc-pg-r { display: flex; align-items: center; gap: 10px; }
.isc-pg-r i { width: 28px; height: 28px; border-radius: 8px; background: var(--raised); flex: none; }
.isc-pg-r u { display: block; height: 8px; border-radius: 4px; background: rgba(234, 227, 215, .18); }
.isc-pg-f { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); }
.isc-pg-f b { padding: 8px 14px; border-radius: 10px; color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }

/* two rows of posts: loaded, and the next ten */
.isc-strip { width: 100%; max-height: 240px; }
.isc-sl { font-size: 13px; font-weight: 700; fill: var(--dim); }
.isc-t rect { fill: var(--raised); stroke: var(--line-strong); }
.isc-t text { font-size: 13px; font-weight: 700; text-anchor: middle; fill: var(--text); font-family: var(--mono); }
.isc-t2 rect { fill: none; stroke-dasharray: 4 3; }
.isc-t2 text { fill: var(--faint); }
.isc-t2.in rect { fill: rgba(123, 92, 253, .35); stroke: var(--violet); stroke-dasharray: none; transition: fill .3s; }
.isc-t2.in text { fill: var(--text); }
.isc-you { fill: none; stroke: var(--gold); stroke-width: 3; }
.isc-flag { opacity: 0; }
.isc-flag.on { opacity: 1; transition: opacity .2s; }
.isc-flag text { font-size: 13px; font-weight: 700; fill: var(--violet-bright); }

/* the soup test */
.isc-soupsvg { width: 100%; max-height: 250px; }
.isc-soup { fill: #E0873A; transition: y .12s; }
.isc-bowl { fill: none; stroke: var(--text); stroke-width: 4; stroke-linecap: round; }
.isc-rim { stroke: var(--text); stroke-width: 2; opacity: .35; }
.isc-table { stroke: var(--line-strong); stroke-width: 3; }
.isc-tube { fill: none; stroke: #E0873A; stroke-width: 4; stroke-dasharray: 6 4; opacity: .8; }
.isc-pot { fill: var(--raised); stroke: #E0873A; stroke-width: 2; }
.isc-cap { font-size: 14px; font-weight: 700; text-anchor: middle; fill: var(--text); }
.isc-hid { font-size: 13px; text-anchor: middle; fill: var(--dim); }
.isc-empty { font-size: 15px; font-weight: 800; text-anchor: middle; fill: var(--gold); opacity: 0; }
.isc-empty.on { opacity: 1; transition: opacity .2s; }

.isc-res { width: 100%; display: grid; gap: 8px; }
.isc-rt { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.isc-rr { display: grid; grid-template-columns: 96px 1fr 44px; align-items: center; gap: 8px; font-size: 13px; }
.isc-rr u { display: block; height: 22px; border-radius: 7px; background: var(--raised); overflow: hidden; }
.isc-rr u i { display: block; height: 100%; width: 0; border-radius: 7px; background: #E0873A; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.isc-rr b { font-family: var(--mono); color: var(--gold); }
.isc-guess { display: grid; gap: 8px; margin-top: 6px; opacity: 0; }
.isc-guess.on { opacity: 1; transition: opacity .3s; }
.isc-guess .isc-rr u i { background: var(--violet); }

/* the week of phones */
.isc-study { width: 100%; display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 8px; }
.isc-st { display: grid; align-content: center; justify-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; background: var(--raised); text-align: center; }
.isc-st b { font-size: 22px; font-weight: 800; color: var(--gold); }
.isc-st span { font-size: 12px; color: var(--dim); line-height: 1.25; }
.isc-out { grid-column: 1 / -1; display: grid; gap: 8px; opacity: 0; }
.isc-out.on { opacity: 1; transition: opacity .3s; }
.isc-few { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.isc-few b { font-family: var(--mono); color: var(--gold); }
.isc-why { display: flex; flex-wrap: wrap; gap: 6px; }
.isc-why i { font-style: normal; font-size: 13px; padding: 6px 10px; border-radius: 999px; background: rgba(63, 214, 154, .14); color: var(--mint); }

@media (max-height: 700px) {
  .isc-feed { height: 196px; }
  .isc-pic { height: 60px; }
  .isc-hero img { max-height: 230px; }
  .isc-soupsvg { max-height: 200px; }
  .isc-pages { gap: 7px; padding: 10px 12px; }
}
