/* Shared reading and form styles for the lab and handout. */
body.lab-page {
  margin: 0;
  overflow: auto;
  background: #111214;
  color: #d6d9e0;
  -webkit-font-smoothing: antialiased;
}
.lab {
  min-height: 100vh;
  background: #111214;
  color: #d6d9e0;
  font: 16px/1.65 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}
.lab *, .lab *::before, .lab *::after { box-sizing: border-box; }
.lab a { color: #74a9ed; text-decoration: underline; text-underline-offset: 3px; }
.lab a:hover { text-decoration-thickness: 2px; }
.lab :is(a, button, input, select, textarea):focus-visible { outline: 2px solid #74a9ed; outline-offset: 4px; }
.lab-header {
  max-width: 840px;
  margin: 0 auto;
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.lab .lab-brand { display: inline-flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.lab .lab-brand img { display: block; width: auto; height: 28px; }
.lab-header nav { display: flex; flex-wrap: wrap; gap: 24px; font-size: 14px; }
.lab-header nav a { color: #b5bbc5; text-decoration: none; }
.lab-header nav a[aria-current="page"] { color: #c8a650; font-weight: 600; text-decoration: underline; }
.lab-header nav a:hover { text-decoration: underline; }
.lab main { max-width: 840px; margin: 0 auto; padding: 40px 32px 80px; }
.lab .lab-intro { margin: 0 0 48px; }
.lab :is(h1, h2, h3, h4) { color: #f0f1f3; }
.lab h1 { margin: 0 0 16px; font-size: 36px; line-height: 1.2; font-weight: 650; letter-spacing: -1px; }
.lab h2 { margin: 48px 0 16px; font-size: 25px; line-height: 1.3; font-weight: 600; letter-spacing: -.45px; scroll-margin-top: 24px; }
.lab h3 { margin: 30px 0 10px; font-size: 18px; line-height: 1.4; font-weight: 600; }
.lab h4 { margin: 20px 0 8px; font-size: 15px; line-height: 1.4; font-weight: 600; }
.lab p { margin: 12px 0; }
.lab ul, .lab ol { padding-left: 24px; margin: 16px 0; }
.lab li { padding-left: 4px; margin: 10px 0; }
.lab strong { font-weight: 600; }
.lab .quiet, .lab .attempt-meta { font-size: 14px; line-height: 1.6; color: #a9afb9; }
.lab-section { margin-top: 48px; }
.lab-section > h2:first-child { margin-top: 0; }
.lab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 20px 0; }
.lab label { display: block; margin: 20px 0; font-size: 15px; font-weight: 500; }
.lab-grid > label { margin: 0; }
.lab input:not([type="checkbox"]), .lab textarea, .lab select {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 8px;
  padding: 11px 12px;
  color: #f0f1f3;
  background: #1a1c21;
  border: 1px solid #696f7a;
  border-radius: 5px;
  font: inherit;
  font-weight: 400;
  line-height: 1.5;
}
.lab textarea { resize: vertical; }
.lab input::placeholder { color: #a9afb9; }
.lab input[type="file"] { border: 0; padding: 4px 0; }
.lab input[type="file"]::file-selector-button { font: inherit; margin-right: 12px; padding: 8px 12px; background: #1a1c21; color: #d6d9e0; border: 1px solid #696f7a; border-radius: 4px; cursor: pointer; }
.lab button, .lab .button-link {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #c8a650;
  border-radius: 5px;
  background: #c8a650;
  color: #111214;
  font: 500 14px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}
.lab .button-link { display: inline-flex; align-items: center; text-decoration: none; }
.lab button:hover:not(:disabled), .lab .button-link:hover { background: #d8ba6b; }
.lab button.secondary { background: transparent; color: #d6d9e0; border-color: #696f7a; }
.lab button.secondary:hover:not(:disabled) { background: #25282e; }
.lab button:disabled { cursor: not-allowed; color: #8e949e; border-color: #454a54; background: #1a1c21; }
.lab .button-row, .lab .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.lab .target-ready, .lab .key-settings, .lab .peer-setup { margin-top: 32px; }
.lab .check-row { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0; font-weight: 400; }
.lab .check-row input { flex: 0 0 17px; width: 17px; height: 17px; margin-top: 5px; accent-color: #c8a650; }
.lab .section-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.lab .section-top h2 { margin: 0; }
.lab .attempt { margin: 36px 0 44px; }
.lab .attempt > h3 { margin-bottom: 4px; }
.lab .attempt-meta { margin: 4px 0 20px; }
.lab code { font: .88em/1.6 "SFMono-Regular", Consolas, "Liberation Mono", monospace; color: inherit; overflow-wrap: anywhere; }
.lab pre { margin: 12px 0 20px; padding: 16px 18px; border-radius: 4px; background: #1a1c21; color: #d6d9e0; font: 13px/1.75 "SFMono-Regular", Consolas, "Liberation Mono", monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.lab .findings p { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.lab .lab-feedback { margin-top: 32px; }
.lab .lab-error { color: #efa7a7; }
.lab .lab-footer { margin-top: 56px; font-size: 14px; color: #a9afb9; }
.lab table { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 24px 0; font-size: 15px; line-height: 1.6; }
.lab th { font-weight: 600; text-align: left; }
.lab th, .lab td { padding: 10px 16px 10px 0; vertical-align: top; overflow-wrap: anywhere; }
.lab th:last-child, .lab td:last-child { padding-right: 0; }
.lab #copy-status { display: block; font-size: 14px; }
/* Consistent section headers make the long participant handout easier to scan. */
.lab .handout > h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 72px 0 24px;
  padding: 20px 24px;
  background: #1a1c21;
  border-radius: 5px;
  font-size: 30px;
  line-height: 1.3;
  font-weight: 650;
}
.lab .handout > .lab-intro + h2 { margin-top: 48px; }
.lab .handout-step { flex-shrink: 0; color: #c8a650; font-weight: 700; }
.lab .handout h3 { margin: 40px 0 16px; font-size: 22px; }
.lab .handout h4 { margin: 28px 0 12px; font-size: 16px; }
.lab .handout-table { margin: 24px 0; overflow-x: auto; }
.lab .handout-table:focus-visible { outline: 2px solid #74a9ed; outline-offset: 4px; }
.lab .handout table { min-width: 560px; margin: 0; border: 1px solid #4b515d; }
.lab .handout th, .lab .handout td { padding: 14px 16px; border: 1px solid #4b515d; }
.lab .handout th { background: #25282e; color: #f0f1f3; font-weight: 650; }
.lab .handout .files-table th:first-child { width: 34%; }
.lab .lab-workflow .lab-section { margin-top: 64px; }
.lab .lab-workflow .lab-section > h2 { display: flex; align-items: baseline; gap: 14px; margin: 0 0 24px; padding: 20px 24px; background: #1a1c21; border-radius: 5px; font-size: 28px; font-weight: 650; }
.lab .lab-workflow h3 { margin: 32px 0 12px; font-size: 21px; }
.lab .lab-workflow .attempt { margin: 24px 0 32px; }
.lab .lab-workflow .lab-feedback { margin-top: 20px; }
@media (max-width: 600px) {
  .lab-header { padding: 22px 24px 8px; align-items: flex-start; flex-direction: column; gap: 14px; }
  .lab-header nav { gap: 22px; }
  .lab main { padding: 32px 24px 60px; }
  .lab h1 { font-size: 30px; letter-spacing: -.6px; }
  .lab h2 { font-size: 23px; }
  .lab-grid { grid-template-columns: 1fr; gap: 20px; }
  .lab .section-top { align-items: flex-start; flex-direction: column; }
  .lab table, .lab tbody, .lab tr, .lab td { display: block; width: 100%; }
  .lab thead { display: none; }
  .lab tr { margin-bottom: 26px; }
  .lab td { padding: 5px 0; }
  .lab td::before { content: attr(data-label) ": "; font-weight: 600; }
  .lab .handout > h2 { margin-top: 56px; padding: 16px; font-size: 26px; }
  .lab .handout h3 { font-size: 21px; }
  .lab .handout table { display: table; }
  .lab .handout thead { display: table-header-group; }
  .lab .handout tbody { display: table-row-group; }
  .lab .handout tr { display: table-row; margin: 0; }
  .lab .handout td { display: table-cell; width: auto; }
  .lab .handout td::before { content: none; }
  .lab .lab-workflow .lab-section > h2 { padding: 16px; font-size: 26px; }
}
@media print {
  body.lab-page, .lab { background: #fff; color: #111; }
  .lab { font-size: 11pt; color-scheme: light; }
  .lab :is(h1, h2, h3, h4, a, .quiet, .attempt-meta, .lab-footer) { color: #111; }
  .lab main { padding: 0; max-width: none; }
  .lab-header, .lab .actions, .lab button { display: none; }
  .lab h1 { font-size: 26pt; }
  .lab h2 { font-size: 17pt; break-after: avoid; }
  .lab h3, .lab h4 { break-after: avoid; }
  .lab pre, .lab tr { break-inside: avoid; }
  .lab pre { font-size: 9pt; background: #f4f4f4; color: #303030; }
  .lab .handout > h2 { margin: 28pt 0 12pt; padding: 0; background: none; font-size: 19pt; }
  .lab .handout > .lab-intro + h2 { margin-top: 24pt; }
  .lab .handout-step { color: #111; }
  .lab .handout h3 { margin: 20pt 0 8pt; font-size: 14pt; }
  .lab .handout h4 { margin: 16pt 0 6pt; font-size: 11pt; }
  .lab .handout-table { overflow: visible; }
  .lab .handout table { min-width: 0; border-color: #777; }
  .lab .handout th, .lab .handout td { padding: 8pt 10pt; border-color: #777; }
  .lab .handout th { background: #eee; color: #111; }
}
