/* Attention economy lesson. All rules scoped under .at-* */

/* Loop: the app the player runs, one panel across the lesson */
.at-app { width: 100%; display: grid; gap: 12px; padding: 12px 14px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.at-top { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.at-top b { font-weight: 800; }
.at-logo { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, var(--violet), #E0569B); color: #fff; font-size: 17px; font-weight: 800; line-height: 1; }
.at-top em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }

/* who pays: viewers -> Loop <- ? */
.at-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 4px; }
.at-node { min-height: 44px; display: grid; place-items: center; padding: 6px 4px; border-radius: 12px; background: var(--raised); font-size: 13px; font-weight: 700; text-align: center; }
.at-node.loop { background: rgba(123, 92, 253, .22); border: 1px solid var(--violet); }
.at-node.who { border: 1px dashed var(--line-strong); background: none; color: var(--dim); font-size: 18px; }
.at-flow.paid .at-node.who { border: 1px solid var(--gold); color: var(--gold); font-size: 12px; animation: atPop .45s; }
.at-arrow { display: flex; flex-direction: column; align-items: center; min-width: 50px; font-size: 12px; font-weight: 700; color: var(--dim); }
.at-arrow small { font-size: 12px; }
.at-arrow i { font-style: normal; font-size: 20px; line-height: 1; }
.at-flow.paid .at-arrow small { color: var(--gold); animation: atPop .45s; }
.at-flow.paid .at-arrow i { color: var(--gold); }
@keyframes atPop { 40% { transform: scale(1.15); } }

.at-rows { display: grid; gap: 7px; }
.at-r { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--dim); }
.at-r b { font-family: var(--mono); font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.at-r.day, .at-r.yr { border-top: 1px solid var(--line); padding-top: 7px; }
.at-r.day b, .at-r.yr b { font-family: var(--sans); font-size: 20px; font-weight: 800; color: var(--gold); }
.at-r.yr { border-top: 0; padding-top: 0; }
.at-app.hit .at-r.yr b { animation: atPop .45s; }

/* Meta's year, one bar */
.at-meta { width: 100%; display: grid; gap: 8px; }
.at-mh { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 700; color: var(--dim); }
.at-mh b { font-size: 18px; color: var(--text); }
.at-bar { position: relative; height: 34px; border-radius: 10px; background: var(--raised); }
.at-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 10px; background: var(--gold); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.at-bar em { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: #fff; font-style: normal; opacity: 0; transition: opacity .3s; }
.at-bar em.on { opacity: 1; }
.at-bar em span { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 3px; font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap; }
.at-ml { display: grid; gap: 4px; min-height: 40px; margin-top: 14px; font-size: 14px; font-weight: 700; }
.at-ml .ads { color: var(--gold); }

/* Loop's feed: two videos, clicks and minutes bars */
.at-feed { display: grid; gap: 8px; }
.at-vid { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; background: var(--raised); }
.at-vid img { width: 64px; height: 48px; object-fit: contain; }
.at-vid .vt { font-size: 13.5px; font-weight: 800; margin-bottom: 5px; }
.at-vb { display: grid; grid-template-columns: 58px 1fr; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--faint); }
.at-vb + .at-vb { margin-top: 3px; }
.at-vb u { display: block; height: 6px; border-radius: 999px; background: rgba(234, 227, 215, .08); overflow: hidden; }
.at-vb u i { display: block; height: 100%; border-radius: 999px; background: var(--faint); transition: background .3s; }
.at-feed.by-c .at-vb.c, .at-feed.by-m .at-vb.m { color: var(--text); }
.at-feed.by-c .at-vb.c u i, .at-feed.by-m .at-vb.m u i { background: var(--gold); }

/* your two hours */
.at-hourbox { width: 100%; margin-bottom: 14px; }
.at-hourbox .lbl { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.at-hour { position: relative; height: 44px; border-radius: 12px; background: var(--raised); overflow: hidden; display: flex; }
.at-hour i { display: block; height: 100%; }
.at-hour .w { width: 50%; background: var(--mint); transition: width .05s; }
.at-hour .l { flex: 1; background: repeating-linear-gradient(135deg, #3A1717 0 6px, #4a1d1d 6px 12px); }
.at-hour .d { width: 0; background: var(--gold); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.at-hour input { position: absolute; inset: 0; height: 100%; opacity: 0; }
.at-hourbox .cap { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; margin-top: 6px; color: var(--dim); }
.at-hourbox .cap .cw { color: var(--mint); } .at-hourbox .cap .cl { color: #FF8A8A; } .at-hourbox .cap .cd { color: var(--gold); }


/* the pile: ten minutes spread over more and more messages */
.at-pile { width: 100%; display: grid; gap: 12px; }
.at-grid { display: grid; grid-template-columns: repeat(20, minmax(0, 15px)); gap: 3px; justify-content: center; }
.at-grid i { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--raised); }
.at-grid i.on { background: var(--gold); transition: opacity .15s; }
.at-key { font-size: 13px; color: var(--dim); text-align: center; }
.at-read { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--dim); }
.at-read b { color: var(--text); font-variant-numeric: tabular-nums; }
.at-read .each { color: var(--gold); }

/* the YouTube guess against the real drop */
.at-yt { display: flex; justify-content: space-between; gap: 10px; min-height: 22px; margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--dim); }
.at-yt b { color: var(--text); } .at-yt .dn { color: var(--gold); }
.at-vl { font-size: 13px; color: var(--dim); line-height: 1.3; }
.at-vid .at-vb { margin-top: 4px; grid-template-columns: 80px 1fr; }
.at-vn { color: var(--gold); font-family: var(--mono); white-space: nowrap; }
@media (max-height: 700px) { .at-vid { padding: 6px 10px; } .at-vid .vt { margin-bottom: 2px; } .at-feed { gap: 6px; } }
.at-sw { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.at-sw span { padding: 10px 8px; border-radius: 12px; background: var(--raised); font-size: 14px; font-weight: 700; text-align: center; color: var(--dim); }
.at-sw span.on { color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }
.at-sw i { font-style: normal; color: var(--faint); font-size: 20px; }
