/* Lab page ("Try it"). Built on style.css tokens; nothing here changes index.html. */
body.lab main { max-width: 1240px; }
.lab-steps { flex: 1; min-width: 0; display: flex; justify-content: center; gap: 6px; max-width: 760px; margin: 0 auto; position: relative; }
.lstep { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
.lstep .dot { width: 15px; height: 15px; border-radius: 50%; border: 3px solid var(--line); background: var(--floor); flex: none; }
.lstep + .lstep::before { content: ""; width: 22px; height: 3px; background: var(--line); border-radius: 2px; margin-right: 4px; }
.lstep.done .dot { background: var(--tote); border-color: var(--tote); }
.lstep.done + .lstep::before, .lstep.done::before { background: var(--tote); }
.lstep.active { color: var(--ink); }
.lstep.active .dot { border-color: var(--tote); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tote) 30%, transparent); }
.back { white-space: nowrap; text-decoration: none; }

.lab-hero { padding: 56px 0 28px; max-width: 900px; }
.lab-hero .takeaway { max-width: 34ch; }
.newcity { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; background: var(--panel); border-left: 6px solid var(--pass); border-radius: 6px; padding: 10px 16px; margin: 4px 0 6px; font-size: 15px; }
.newcity b { font-family: var(--display); font-weight: 800; font-size: 30px; color: var(--pass); line-height: 1; }
.pystatus { font-size: 15px; display: flex; gap: 10px; align-items: center; margin: 18px 0 6px; }
.pill { display: inline-block; font-size: 13px; font-weight: 700; padding: 1px 10px; border-radius: 999px; background: var(--band); border: 1.5px solid var(--line); }
.pill.ok { border-color: var(--pass); color: var(--pass); }
.pill.bad { border-color: var(--fail); color: var(--fail); }
.bar { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.bar.thin { height: 5px; max-width: 420px; }
.demo-video { margin-top: 14px; max-width: 900px; }
.demo-video video { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); }
.bar i { display: block; height: 100%; width: 0; background: var(--tote); border-radius: inherit; }
@media (prefers-reduced-motion: no-preference) { .bar i { transition: width .3s ease; } }

.lab-step { padding: 44px 0 36px; border-top: 3px solid var(--ink); scroll-margin-top: 64px; }
.lab-step h2 { font-size: clamp(34px, 4.2vw, 52px); display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.lab-step h2 .n { display: inline-grid; place-items: center; width: 1.1em; height: 1.1em; border-radius: 50%; background: var(--ink); color: var(--floor); font-size: .7em; transform: translateY(-.08em); }
.lab-step h2 .opt { font-size: .45em; font-weight: 600; color: var(--muted); }
.lab-step h3 { font-size: clamp(22px, 2.4vw, 28px); margin-top: 6px; }

.load-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: stretch; }
.drop { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 6px; min-height: 190px; border: 3px dashed var(--line); border-radius: 14px; background: var(--panel); cursor: pointer; padding: 20px; }
.drop:hover, .drop.over { border-color: var(--tote); background: color-mix(in srgb, var(--tote) 8%, var(--panel)); }
.drop:focus-within { outline: 3px solid var(--tote); outline-offset: 2px; }
.drop-big { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3vw, 36px); }
.drop-small { font-size: 15px; color: var(--muted); }
.load-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.load-side .note { margin: 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--ref); text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }
.fileinfo { margin-top: 18px; }

.lab-counters { grid-template-columns: repeat(5, 1fr); margin: 10px 0 28px; }
.lab-counters .num { font-size: clamp(32px, 3.6vw, 48px); }
.check-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: start; }
.check-grid > *, .load-grid > *, .review-grid > * { min-width: 0; }
.key { display: inline-block; width: 11px; height: 11px; border-radius: 2px; vertical-align: -1px; }
.k-test { background: var(--tote); } .k-train { background: var(--ref); } .k-full { background: var(--muted); opacity: .55; } .k-part { background: var(--line); }

.presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 14px 0 6px; }
.preset { text-align: left; background: var(--panel); color: var(--ink); border: 2px solid var(--line); border-top: 6px solid var(--c); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.4; }
.preset b { font-size: 16px; }
.preset span { color: var(--muted); }
.preset:hover { border-color: var(--muted); border-top-color: var(--c); }
.preset[aria-checked="true"] { border-color: var(--ink); border-top-color: var(--c); box-shadow: 0 0 0 2px var(--ink) inset; }

.btn.big { font-size: 18px; padding: 11px 22px; }
.btn:disabled, .ghost:disabled { opacity: .45; cursor: not-allowed; }
.runbox { margin-top: 18px; max-width: 860px; }
.run-meta { margin: 8px 0; font-weight: 600; display: flex; gap: 12px; flex-wrap: wrap; }
.log { max-height: 220px; overflow-y: auto; }
.log .t { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 8px; }

.badge { font-family: var(--body); font-size: 15px; font-weight: 700; background: var(--tote); color: #1B2B3A; padding: 2px 10px; border-radius: 4px; }
.banner { padding: 14px 18px; border-radius: 8px; font-size: 19px; font-weight: 600; margin-bottom: 22px; border-left: 8px solid var(--muted); background: var(--panel); max-width: 980px; }
.banner.green { border-left-color: var(--pass); background: color-mix(in srgb, var(--pass) 13%, var(--panel)); }
.banner.red { border-left-color: var(--fail); background: color-mix(in srgb, var(--fail) 13%, var(--panel)); }
.banner .sub { display: block; font-size: 15px; font-weight: 400; color: var(--muted); margin-top: 4px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 34px; }
.kpi { background: var(--panel); border-radius: 8px; padding: 14px 16px 12px; border-top: 6px solid var(--c); }
.kpi h4 { font-size: 18px; margin-bottom: 4px; }
.kpi .big { font-family: var(--display); font-weight: 800; font-size: 46px; line-height: 1; }
.kpi .big small { font-family: var(--body); font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.kpi dl { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; margin: 10px 0 0; font-size: 14px; }
.kpi dt { color: var(--muted); }
.kpi dd { margin: 0; font-weight: 700; text-align: right; }
.kpi.rec .big { color: var(--pass); }
.kpi.rec.red .big { color: var(--fail); }
.kpi.rec.neutral .big { color: var(--muted); }

.block-lab { margin-top: 40px; }
.det { display: flex; flex-wrap: wrap; gap: 18px 36px; align-items: flex-start; }
.conf { border-collapse: collapse; font-size: 15px; }
.conf th, .conf td { padding: 8px 14px; border: 1px solid var(--line); text-align: right; }
.conf th { color: var(--muted); font-size: 13px; font-weight: 700; }
.conf td.hit { background: color-mix(in srgb, var(--pass) 14%, transparent); font-weight: 700; }
.conf td.miss { background: color-mix(in srgb, var(--fail) 12%, transparent); font-weight: 700; }
.human { margin-top: 16px; }
.mae-fig { max-width: 760px; }
.guardline { font-size: 16px; margin: 6px 0 0; max-width: none; }
.guardline b { font-family: var(--display); font-weight: 800; font-size: 26px; margin-right: 4px; }
.guardline span + span::before { content: "·"; color: var(--muted); margin: 0 12px; }
.trustline { font-weight: 600; margin-top: 14px; }
.review { background: var(--panel); border-radius: 12px; padding: 18px 20px; }
.review h3 { margin-top: 0; }
.review-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
.review .effort { grid-template-columns: repeat(2, 1fr); margin-top: 0; }
.review .effort div { background: var(--floor); }
.pkgcard { background: var(--floor); border-radius: 8px; padding: 12px 16px; font-size: 15px; }
.pkgcard h4 { font-size: 17px; margin-bottom: 6px; }
.pkgcard .verdict { margin: 6px 0 10px; }
.pkgcard dl { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; margin: 0; }
.pkgcard dt { color: var(--muted); }
.pkgcard dd { margin: 0; font-weight: 700; text-align: right; }


.downloads .ghost { font-weight: 600; }
.effort .v small { font-size: 13px; font-weight: 400; color: var(--muted); }

@media (max-width: 1100px) {
  .presets { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1180px) {
  .lstep span:last-child { display: none; }
  .lstep.active span:last-child { display: inline; }
}
@media (max-width: 1000px) {
  .load-grid, .check-grid, .review-grid { grid-template-columns: 1fr; }
  .lab-counters { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .lab-hero { padding: 32px 0 20px; }
  .back { display: none; }
  .lab-steps { gap: 2px; }
  .lstep { padding: 4px 4px; font-size: 13px; }
  .lstep + .lstep::before { width: 10px; }
  .presets { grid-template-columns: 1fr; }
  .kpi .big { font-size: 40px; }
  .banner { font-size: 17px; }
  .conf th, .conf td { padding: 6px 8px; }
}
