/* The lab is a reading page, not the board: it scrolls, and it carries its
   own styles so the board's full-screen rules cannot reach it. Tokens match
   styles.css. */
@font-face { font-family: "Luckiest Guy"; font-weight: 400; font-display: swap; src: url(../brand/fonts/LuckiestGuy.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url(../brand/fonts/Poppins-400.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url(../brand/fonts/Poppins-600.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url(../brand/fonts/Poppins-700.woff2) format("woff2"); }

:root {
  --ground: #f6fffa; --paper: #ffffff; --ink: #1f1a1c; --ink-2: #5a5254; --ink-3: #8b8386; --line: #e3ede8;
  --rose-deep: #c75aa8; --teal: #4b9b9d; --teal-deep: #377f81; --teal-soft: #e2f2f1;
  --gold: #f3bc29; --gold-soft: #fff4d1; --bad: #b4342a;
  --display: "Luckiest Guy", "Poppins", system-ui, sans-serif;
  --text: "Poppins", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--text); line-height: 1.5; font-size: .95rem; }
[hidden] { display: none !important; }

.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 20px; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--display); font-size: 1.15rem; letter-spacing: .02em; }
.brand img { width: 2rem; height: 2rem; }
.brand .w { color: var(--teal-deep); }
.brand .sub { color: var(--ink-2); font-size: .9rem; }
.pill { font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 6px 14px; box-shadow: 3px 3px 0 var(--ink); }

main { max-width: 1180px; margin: 0 auto; padding: 0 16px 80px; }
.lede { font-size: 1.05rem; color: var(--ink-2); max-width: 75ch; margin: 4px 4px 18px; }

.card { background: var(--paper); border: 2.5px solid var(--ink); border-radius: 18px; box-shadow: 5px 5px 0 var(--ink); padding: 16px 18px 18px; margin: 0 0 20px; min-width: 0; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.two > .card { margin-bottom: 20px; }
h2 { font-family: var(--display); font-weight: 400; font-size: 1.35rem; letter-spacing: .02em; margin: 0 0 12px; line-height: 1.15; }
h2 .n { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; background: var(--gold); font-size: .8em; margin-right: .4em; vertical-align: .05em; }
h3 { font-size: .95rem; margin: 16px 0 8px; }
p { margin: 0 0 10px; }
.note { color: var(--ink-2); font-size: .85rem; max-width: 80ch; }
.muted { color: var(--ink-3); }
.small { font-size: .82rem; }

button, .file { font: 600 .88rem/1.2 var(--text); color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 8px 16px; box-shadow: 3px 3px 0 var(--ink); cursor: pointer; }
button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
button.gold { background: var(--gold); }
button:disabled { opacity: .45; cursor: default; box-shadow: none; }
.file input { display: none; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.opts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0; align-items: center; }
.opts label { font-size: .85rem; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
select { font: inherit; font-weight: 400; color: var(--ink); background: var(--paper); border: 2px solid var(--line); border-radius: 10px; padding: 5px 8px; }
.check input { width: 17px; height: 17px; accent-color: var(--teal-deep); }

.seg { display: inline-flex; gap: 0; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; box-shadow: none; background: var(--paper); padding: 8px 16px; }
.seg button.on { background: var(--teal-soft); }
.seg button:active { transform: none; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { padding: 5px 11px; font-size: .8rem; box-shadow: 2px 2px 0 var(--ink); }
.chips button.on { background: var(--gold); }

#view { width: 100%; height: auto; border-radius: 12px; background: #20262a; display: block; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px 14px; margin: 10px 0 4px; }
.stats div { font-size: .78rem; color: var(--ink-3); }
.stats b { display: block; font-size: 1rem; color: var(--ink); font-weight: 600; }

.eye-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 10px; }
.eye-row figure { margin: 0; min-width: 0; }
.eye-row canvas { width: 100%; height: auto; display: block; border-radius: 8px; background: #20262a; image-rendering: pixelated; }
.eye-row figcaption { font-size: .68rem; color: var(--ink-3); line-height: 1.25; margin-top: 3px; }
.legend { font-size: .8rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.key { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 2px; vertical-align: -1px; }
.key.blue { background: #2f6fe0; } .key.orange { background: #e4862f; }

.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .85rem; margin: 6px 0 12px; }
th, td { text-align: left; vertical-align: top; padding: 8px 8px; border-bottom: 1px solid var(--line); }
th { font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; }
td .about { display: block; color: var(--ink-3); font-size: .76rem; max-width: 46ch; }
td.big { font-family: var(--display); font-size: 1.15rem; white-space: nowrap; }
tr.best td { background: var(--gold-soft); }
tr.failed td { color: var(--ink-3); }
.bar { display: inline-block; height: 8px; border-radius: 4px; background: var(--teal); vertical-align: middle; margin-right: 6px; }
.verdict { font-size: 1.05rem; font-weight: 600; background: var(--teal-soft); border-radius: 12px; padding: 10px 14px; }
#scatter, #field { width: 100%; height: auto; display: block; border: 2px solid var(--line); border-radius: 12px; background: var(--ground); }

.about-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; }
.about-list div { border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: .85rem; color: var(--ink-2); }
.about-list b { display: block; color: var(--ink); margin-bottom: 2px; }

#stage { position: fixed; inset: 0; z-index: 100; background: var(--ground); cursor: none; }
#target { position: absolute; width: 0; height: 0; }
#target .chick { position: absolute; left: -32px; top: -34px; width: 64px; font-size: 44px; line-height: 64px; text-align: center; }
#target .ring { position: absolute; left: -44px; top: -44px; width: 88px; height: 88px; border-radius: 50%; border: 5px solid var(--line); }
#target.recording .ring { border-color: var(--teal); }
#stage-caption { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); font-size: .9rem; color: var(--ink-2); background: var(--paper); border-radius: 999px; padding: 6px 14px; }
#stage-cancel { position: absolute; right: 14px; top: 14px; cursor: pointer; z-index: 2; }
#stage-tools { display: none; }
#stage.live #stage-tools { display: flex; position: absolute; right: 100px; top: 10px; z-index: 2; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
#stage-tools label { font-size: .8rem; font-weight: 600; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
#stage-field { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
#stage.live { cursor: default; }
#stage.live #stage-field { display: block; }
#stage.live #target { display: none; }
#flower, #bee { position: absolute; width: 64px; height: 64px; margin: -32px 0 0 -32px; font-size: 48px; line-height: 64px; text-align: center; pointer-events: none; }
#bee { font-size: 40px; transition: none; }
#history table td:first-child { white-space: nowrap; }
.face-live { display: grid; gap: 6px; margin: 10px 0; }
.face-live .bar-row { display: grid; grid-template-columns: 1.6rem 11rem minmax(0, 1fr) 3rem; gap: 8px; align-items: center; font-size: .85rem; }
.face-live .track { height: 14px; border-radius: 7px; background: var(--line); overflow: hidden; position: relative; }
.face-live .fill { height: 100%; width: 0; border-radius: 7px; background: var(--teal); }
.face-live .fill.made { background: var(--gold); }
.face-live .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
#face-prompt { display: flex; align-items: center; gap: 16px; margin: 12px 0; padding: 16px 20px; border: 3px solid var(--ink); border-radius: 18px; background: var(--gold-soft); }
#face-prompt[hidden] { display: none; }
#face-prompt .emoji { font-size: 3.4rem; line-height: 1; }
#face-prompt .text { font-family: var(--display); font-size: 1.6rem; letter-spacing: .02em; }
@media (max-width: 600px) { .face-live .bar-row { grid-template-columns: 1.6rem 7rem minmax(0, 1fr) 2.6rem; } }
