/* The Lab: paper trading. */
.lab-hero .display { font-size: clamp(3rem, 7vw, 6.4rem); }
.lab { display: grid; gap: 20px; }
.lab > .wrap { display: grid; gap: 20px; }

.lab-summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 20px 40px; padding: 22px clamp(20px, 3vw, 32px); }
.lab-summary__main { display: grid; gap: 4px; }
.lab-summary__main b { font: 400 clamp(2.4rem, 4.2vw, 3.4rem)/1 var(--font-serif); letter-spacing: -.02em; }
.lab-summary__main .badge { justify-self: start; }
.lab-summary__stats { display: flex; flex-wrap: wrap; gap: 14px 34px; margin: 0; }
.lab-summary__stats dt { font: 500 .68rem/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.lab-summary__stats dd { margin: 6px 0 0; font-size: 1.05rem; }
.lab-summary__live { display: flex; align-items: center; gap: 10px; }
@media (max-width: 1000px) { .lab-summary { grid-template-columns: 1fr; } }

.lab-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
@media (max-width: 1080px) { .lab-grid { grid-template-columns: 1fr; } }
.lab-asset { display: grid; gap: 18px; }
.lab-asset__quote { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; justify-content: flex-end; }
.lab-asset__quote > b { font-size: clamp(1.7rem, 2.8vw, 2.3rem); font-weight: 500; letter-spacing: -.02em; }
.lab-asset__ba { flex-basis: 100%; display: flex; gap: 16px; justify-content: flex-end; font-size: .8rem; color: var(--muted); }
.lab-asset__ba b { font-weight: 500; }
.lab-asset__chart { height: 340px; }
.lab-watch { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.watch {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 2px 10px; align-items: center; padding: 10px 12px;
  border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); text-align: left; cursor: pointer; transition: border-color .2s, background .2s;
}
.watch:hover { border-color: var(--line-2); background: var(--surface); }
.watch[aria-selected='true'] { border-color: rgba(255, 181, 74, .55); background: rgba(255, 181, 74, .07); }
.watch .board-row__icon { grid-row: 1 / 3; width: 30px; height: 30px; font-size: .55rem; }
.watch b { font-weight: 500; font-size: .9rem; }
.watch span.num { font-size: .78rem; }
@media (max-width: 760px) { .lab-watch { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lab-asset__chart { height: 260px; } }

.lab-side { display: grid; gap: 20px; position: sticky; top: calc(var(--nav-h) + 16px); }
@media (max-width: 1080px) { .lab-side { position: static; } }
.ticket { display: grid; gap: 18px; padding: 22px; }
.ticket__sides { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.ticket__sides input { position: absolute; opacity: 0; pointer-events: none; }
.ticket__sides label { display: grid; place-items: center; height: 44px; border-radius: 12px; font-weight: 600; cursor: pointer; color: var(--muted); transition: all .2s; }
.ticket__sides input:checked + .ticket__buy { background: rgba(63, 224, 165, .16); color: var(--gain); box-shadow: inset 0 0 0 1px rgba(63, 224, 165, .45); }
.ticket__sides input:checked + .ticket__sell { background: rgba(255, 107, 107, .14); color: var(--loss); box-shadow: inset 0 0 0 1px rgba(255, 107, 107, .45); }
.ticket__sides input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: 2px; }
.ticket__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ticket__amt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.seg--xs label { height: 28px; padding: 0 10px; font-size: .76rem; }
.ticket__amt { font-size: 1.25rem; height: 56px; }
.ticket__quick { display: flex; gap: 6px; flex-wrap: wrap; }
.ticket__quick .chip { height: 28px; font-size: .75rem; }
.ticket__est { display: grid; gap: 8px; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); }
.ticket__est div { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }
.ticket__est dt { color: var(--muted); }
.ticket__est dd { margin: 0; }
.ticket__total { padding-top: 8px; border-top: 1px dashed var(--line); font-weight: 600; }
.ticket__total dd { font-size: 1.05rem; }
.ticket__msg { min-height: 1.3em; margin: 0; font-size: .86rem; color: var(--loss); }
.ticket__msg.is-ok { color: var(--gain); }
.ticket__submit { border: 0; color: #04140d; background: linear-gradient(120deg, #9df5d2, #3fe0a5); box-shadow: 0 14px 34px -14px rgba(63, 224, 165, .8); }
.ticket__submit:hover { filter: brightness(1.06); background: linear-gradient(120deg, #b2f8dc, #4fe9af); }
.ticket__submit.is-sell { color: #1e0505; background: linear-gradient(120deg, #ffb3b3, #ff6b6b); box-shadow: 0 14px 34px -14px rgba(255, 107, 107, .8); }
.ticket__avail { margin: -6px 0 0; text-align: center; }

.achv { padding: 22px; }
.achv__head { display: flex; justify-content: space-between; align-items: center; }
.achv__list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.achv__list li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; border: 1px solid var(--line); opacity: .55; }
.achv__list li.is-done { opacity: 1; border-color: rgba(255, 181, 74, .4); background: rgba(255, 181, 74, .06); }
.achv__icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.achv__list li.is-done .achv__icon { background: radial-gradient(circle at 30% 25%, #ffe9c2, #ffb54a 60%, #ff7a3d); color: #2a1604; }
.achv__icon .i { width: 16px; height: 16px; }
.achv__list b { display: block; font-size: .9rem; font-weight: 500; }
.achv__list small { color: var(--muted); font-size: .76rem; line-height: 1.35; display: block; }
.achv__xp { font: 500 .72rem/1 var(--font-mono); color: var(--gold-2); }

.lab-tabs { padding: 0; overflow: hidden; }
.lab-tabs__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.lab-panel { overflow-x: auto; }
.lab-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 720px; }
.lab-table th { text-align: left; padding: 12px 18px; font: 500 .68rem/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); border-bottom: 1px solid var(--line); white-space: nowrap; }
.lab-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lab-table tr:last-child td { border-bottom: 0; }
.lab-table .r { text-align: right; }
.lab-table .asset { display: flex; align-items: center; gap: 10px; }
.lab-table .asset .board-row__icon { width: 28px; height: 28px; font-size: .52rem; }
.alloc { width: 90px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 8px; }
.alloc span { display: block; height: 100%; background: var(--doppler); }
.lab-empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.lab-equity { height: 320px; padding: 16px; }

.lab-learn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lab-learn .card { display: grid; gap: 8px; }
.lab-learn__t { font: 400 1.35rem/1.2 var(--font-serif); color: var(--text); }
@media (max-width: 860px) { .lab-learn { grid-template-columns: 1fr; } }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 140; }
