/* The Lab page: the same night ground, cream type and CRT blue as the landing. */
.labpage main { padding-top: 60px; }
.lab-hero { padding: 96px 0 40px; border-bottom: 1px solid var(--line2); background: radial-gradient(60% 120% at 85% 0%, #2c55e01f, #0000 60%); }
.h1 { margin: 0; font: 700 clamp(44px, 7vw, 84px)/.95 var(--pixel); letter-spacing: -.02em; color: var(--cream); text-wrap: balance; max-width: 900px; }
.lab-lede { margin: 26px 0 0; max-width: 700px; }
.stats { margin-top: 44px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.stats > div { background: var(--panel); padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stats b { font: 700 30px/1 var(--pixel); color: var(--cream); white-space: nowrap; }
.stats span { font-size: 13px; color: var(--dim); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.section.tight { padding: 88px 0 0; }
.section.tight:last-of-type { padding-bottom: 110px; }
.row-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; }
.sub { margin: 14px 0 0; max-width: 640px; font-size: 15.5px; }
.filters, .seg { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
.filters button, .seg button { background: none; border: 0; border-radius: 999px; padding: 7px 14px; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.filters button[aria-selected="true"], .seg button[aria-selected="true"] { background: var(--cream); color: #0b0d10; }
.qgrid { margin: 36px 0 0; padding: 0; list-style: none; display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .qgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .qgrid { grid-template-columns: 1fr; } }
.qcard { width: 100%; height: 100%; text-align: left; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: border-color .2s, background .2s; }
.qcard:hover { border-color: #ede6d645; background: var(--panel2); }
.qcard.solved { border-color: #9fd1c240; }
.qtop { display: flex; justify-content: space-between; gap: 10px; font: 400 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.qtop .tag { color: var(--signal); }
.qcard h3 { margin: 2px 0 0; font-size: 18px; font-weight: 500; color: var(--cream); }
.meter { height: 6px; border-radius: 3px; background: #ede6d612; overflow: hidden; }
.meter i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--signal) 0 6px, #0000 6px 8px); }
.qstart { font-size: 12.5px; color: var(--dim); }
.qbest { display: flex; align-items: center; gap: 9px; font: 400 12.5px/1.4 var(--mono); color: var(--cream); min-width: 0; }
.qbest span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qby { font-size: 12.5px; color: var(--muted); margin-top: auto; }
.qbest .dot { flex: none; }
.two { display: grid; gap: 56px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1000px) { .two { grid-template-columns: 1fr; gap: 40px; } }
.tbl { margin-top: 26px; overflow-x: auto; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 400 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line2); color: var(--cream); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.empty { color: var(--dim) !important; font-size: 14px; }
.feed { margin: 26px 0 0; padding: 6px 0; list-style: none; max-height: 520px; overflow-y: auto; }
.feed li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 18px; border-bottom: 1px solid var(--line2); font-size: 14px; color: var(--cream); }
.feed li:last-child { border-bottom: 0; }
.feed li.empty { display: block; padding: 18px; }
.feed .dot { margin-top: 7px; }
.feed .mono { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.feed time { font-size: 12px; color: var(--dim); white-space: nowrap; }
.facts { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; font-size: 14.5px; color: var(--muted); }
.facts b { color: var(--cream); font-weight: 500; margin-right: 6px; }
.facts code { font-size: 13px; color: var(--cream); background: #ede6d60f; padding: 1px 6px; border-radius: 5px; }
.own { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.lbl { font: 400 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.own textarea, .qasm { width: 100%; resize: vertical; background: #07090b; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font: 400 13px/1.6 var(--mono); color: var(--cream); outline: 0; tab-size: 2; }
.code .qasm { border: 0; border-radius: 0; min-height: 260px; }
.own textarea:focus, .qasm:focus { border-color: #6f93ff70; }
.own-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.own-row select { background: #07090b; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 13.5px; color: var(--cream); }
.own-row .pill { margin-left: auto; }
.note { font-size: 13px; color: var(--muted); margin: 0; }
.note.good { color: var(--good); } .note.bad { color: var(--limit); }
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; font-size: 13.5px; color: var(--cream); }
.steps .dot { margin-top: 6px; }
.steps .mono { font-size: 12.5px; color: var(--muted); }
.steps li.final { display: block; }
.ans { margin: 10px 0 0; max-height: 240px; overflow: auto; background: #07090b; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; line-height: 1.6; color: var(--cream); white-space: pre; }
.acts2 { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.screen { padding: 14px; background: #0a0c0f; }
.screen canvas { width: 100%; height: auto; display: block; border-radius: 10px; image-rendering: pixelated; box-shadow: 0 0 50px 4px #2c55e033, inset 0 0 30px #0007; }
/* the problem panel */
.pd { width: min(860px, calc(100vw - 24px)); max-height: calc(100svh - 40px); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--cream); }
.pd::backdrop { background: #05060899; backdrop-filter: blur(3px); }
.pd-in { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 14px; }
.pd header { display: flex; justify-content: space-between; align-items: start; gap: 18px; }
.pd header .kicker { margin-bottom: 10px; }
.pd h2 { margin: 0; font: 700 34px/1 var(--pixel); }
.pd h3 { margin: 14px 0 0; font-size: 15px; font-weight: 500; color: var(--muted); }
.pd .x { background: none; border: 1px solid var(--line); border-radius: 999px; width: 34px; height: 34px; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; flex: none; }
.pd .x:hover { color: var(--cream); border-color: #ede6d655; }
.stmt { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 13px/1.65 var(--mono); color: var(--muted); background: #07090b; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; max-height: 300px; overflow-y: auto; }
.pd-best:empty { display: none; }
.pd-best { border: 1px solid #9fd1c233; border-radius: 10px; padding: 14px 16px; background: #9fd1c208; }
.pd-best .kicker { color: var(--good); margin-bottom: 8px; }
.pd-best .mono { font-size: 13px; }
.pd-best .pill-ghost { margin-top: 12px; }
.pd .feed { margin: 0; max-height: 260px; border: 1px solid var(--line); border-radius: 10px; }
