/* Parity Lab page (/lab). Uses the tokens and chips from site.css. */
.lab { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 880px) { .lab { grid-template-columns: 1fr; } }
.lab-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.lab-panel fieldset { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.lab-panel legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.lab-panel .chip span { font-size: 0.95rem; }
.lab-panel input:disabled + span { opacity: 0.55; cursor: default; }
.hint { color: var(--slate); font-size: 0.92rem; font-weight: 400; margin: 10px 0 0; }
legend .hint { margin: 0 0 0 8px; }
.lab-panel .btn[disabled] { opacity: 0.6; cursor: progress; }
.lab-status { min-height: 1.6em; margin: 14px 0 0; font-weight: 600; }

.lab-flow { display: grid; gap: 18px; }
.flow-title { margin: 0 0 8px; font-weight: 600; }
.flow-title small { font-family: var(--mono); color: var(--slate); font-weight: 400; margin-left: 6px; }
.flow-row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr 1fr; }
.flow-step { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 12px 14px; min-height: 92px; display: flex; flex-direction: column; gap: 2px; transition: border-color .2s, background .2s; }
.flow-step b { font-size: 1rem; }
.flow-step small { color: var(--slate); font-size: 0.82rem; line-height: 1.3; }
.flow-step .state { margin-top: auto; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--slate); }
.flow-step.compare { background: var(--stone); }
.flow-step.report { min-height: 0; flex-direction: row; justify-content: space-between; align-items: center; }
.flow-step.report .state { margin-top: 0; }
.flow-step[data-state="running"] { border-color: var(--green); box-shadow: 0 0 0 2px #EEF5F2; }
.flow-step[data-state="running"] .state { color: var(--green); }
.flow-step[data-state="running"] .state::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--green); animation: lab-pulse 1s ease-in-out infinite; }
.flow-step[data-state="done"] { border-color: var(--green); background: #EEF5F2; }
.flow-step[data-state="done"] .state { color: var(--green); }
.flow-step[data-state="done"] .state::before { content: "✓ "; }
.flow-step[data-state="failed"] { border-color: #A33A2B; }
.flow-step[data-state="failed"] .state { color: #A33A2B; }
@keyframes lab-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .flow-step[data-state="running"] .state::before { animation: none; } }

.lab-results { margin-top: 56px; }
.lab-meta { color: var(--slate); }
.lab-job { border-top: 1px solid var(--line); padding: 28px 0 8px; }
.lab-job header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 8px; }
.lab-job h3 { margin: 0; }
.lab-job h4 { margin: 24px 0 8px; }
.lab-job .table-scroll { margin: 14px 0; }
.lab-job td, .lab-job th { font-variant-numeric: tabular-nums; }
.lab-same { font-weight: 600; color: var(--green); }
.verdict { font-size: 0.82rem; font-weight: 600; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.verdict.same { background: var(--green); color: #fff; }
.verdict.expected { background: var(--warn-bg); color: var(--warn); }
.verdict.fail { background: #A33A2B; color: #fff; }

.lab-arch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 28px 0 36px; }
.lab-arch-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; font-weight: 600; font-size: 0.95rem; line-height: 1.3; }
.lab-arch-box small { display: block; font-weight: 400; color: var(--slate); font-size: 0.8rem; }
.lab-arch-box.strong { border-color: var(--green); }
.lab-arch-arrow { color: var(--slate); }

/* Compact result tables: many numbers, read side by side. */
.lab-job table { min-width: 0; font-size: 0.95rem; }
.lab-job th, .lab-job td { padding: 8px 14px; }
.lab-job thead th { font-size: 0.9rem; }
.lab-job tbody th { width: auto; min-width: 11rem; color: var(--ink); font-weight: 400; }
.lab-job table.wide { min-width: 640px; }

/* The printed report preview: 133-character lines, scrolled sideways on small screens. */
.lab-preview { margin: 20px 0; }
.lab-pre { overflow-x: auto; margin: 6px 0 14px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--mono); font-size: 0.74rem; line-height: 1.45; white-space: pre; }
.lab-job code { font-family: var(--mono); font-size: 0.78rem; white-space: pre; }

/* Account screen (/lab-screen): the 3270 screen next to the web page. */
.scr-form { max-width: 980px; }
.scr-input { margin-bottom: 22px; }
.scr-input label { display: block; margin-bottom: 8px; }
.scr-input-row { display: flex; flex-wrap: wrap; gap: 10px; }
.scr-input-row input { font-family: var(--mono); font-size: 1.15rem; letter-spacing: .08em; width: 15ch; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.scr-input-row input:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.scr-input-row .btn[disabled] { opacity: 0.6; cursor: progress; }
.scr-try { background: none; border: 0; padding: 0; font: inherit; font-family: var(--mono); font-size: 0.88rem; color: var(--green); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.scr-try:disabled { color: var(--slate); cursor: default; }
.scr-results { margin-top: 40px; }
.scr-verdict p { margin: 0 0 6px; }
.scr-verdict .verdict { margin-right: 6px; }
.scr-pair { display: grid; gap: 28px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; margin-top: 22px; }
@media (max-width: 1000px) { .scr-pair { grid-template-columns: 1fr; } }
.scr-side { margin: 0; min-width: 0; }
.scr-side figcaption { margin-bottom: 10px; }
.scr-side figcaption small { display: block; color: var(--slate); font-size: 0.85rem; }
.t3270-frame { background: #0B0E0C; border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; box-shadow: inset 0 0 0 1px #233; container-type: inline-size; }
/* 80 columns always fit the frame: a monospace character is about 0.6em wide. */
.t3270 { margin: 0; font-family: var(--mono); font-size: 0.62rem; font-size: min(0.9rem, 2.04cqw); line-height: 1.35; white-space: pre; color: #5c9dff; background: transparent; }
.t3270 .u { text-decoration: underline; text-underline-offset: 2px; }
.t3270 .cur { background: #38e06c; color: #0B0E0C; }
.c-blue { color: #6ea8ff; } .c-red { color: #ff6b6b; } .c-pink { color: #ff8ad8; } .c-green { color: #46e27a; }
.c-turquoise { color: #4fe3d3; } .c-yellow { color: #ffe35c; } .c-neutral, .c-white { color: #f2f2f2; }
.acct-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.acct-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.acct-kicker { margin: 0; color: var(--slate); font-size: 0.85rem; }
.acct-number { margin: 2px 0 0; font-family: var(--mono); font-size: 1.15rem; font-weight: 600; letter-spacing: .04em; }
.acct-pill { background: #EEF5F2; color: var(--green); font-weight: 600; font-size: 0.82rem; border-radius: 999px; padding: 4px 11px; }
.acct-pill.off { background: var(--stone); color: var(--slate); }
.acct-alert { margin: 16px 0 0; padding: 10px 14px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-size: 0.95rem; overflow-wrap: anywhere; }
.acct-balance { margin: 18px 0 6px; }
.acct-big { margin: 0; font-size: 2rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.acct-big.neg { color: #A33A2B; }
.acct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 14px 0 0; }
.acct-item { margin: 0; min-width: 0; }
.acct-item.wide { grid-column: 1 / -1; }
.acct-item dt { color: var(--slate); font-size: 0.82rem; }
.acct-item dd { margin: 2px 0 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.acct-item.pii dd { font-family: var(--mono); font-size: 0.92rem; }
.acct-sub { margin: 24px 0 2px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 1rem; }
.acct-id { font-family: var(--mono); color: var(--slate); font-weight: 400; font-size: 0.9rem; margin-left: 4px; }
.acct-name { margin: 0; font-size: 1.15rem; font-weight: 600; }
.acct-cards { margin: 18px 0 0; color: var(--slate); font-size: 0.92rem; font-family: var(--mono); }
.scr-more { margin-top: 28px; display: grid; gap: 12px; }
.scr-more details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.scr-more summary { cursor: pointer; font-weight: 600; }
.scr-more .t3270-frame, .scr-more .table-scroll, .scr-more .lab-pre { margin-top: 12px; }
.scr-more table { font-size: 0.9rem; }
.scr-more td code { font-family: var(--mono); font-size: 0.82rem; white-space: pre; }
/* ---- account update (lab-update) */
.upd-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.upd-preset { font: inherit; font-size: 0.92rem; padding: 7px 13px; border-radius: 999px; border: 1px solid #A9AEB8; background: #fff; color: var(--ink); cursor: pointer; }
.upd-preset:hover { border-color: var(--ink); }
.upd-preset[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.upd-preset:disabled { opacity: 0.55; cursor: default; }
.upd-top { display: flex; flex-wrap: wrap; gap: 16px 28px; margin-bottom: 22px; }
.upd-fields { display: grid; gap: 10px 18px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.upd-field { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 0.9rem; }
.upd-field span { color: var(--slate); }
.upd-field input, .upd-field select { font-family: var(--mono); font-size: 0.95rem; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); min-width: 0; }
.upd-field select { font-family: inherit; }
.upd-field input:focus-visible, .upd-field select:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.upd-account select { font-family: var(--mono); }
.upd-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.upd-tabs button { font: inherit; font-size: 0.92rem; padding: 7px 13px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.upd-tabs button[aria-selected="true"] { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); font-weight: 600; }
.upd-tabs button .same-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 8px; background: var(--green); }
.upd-tabs button .diff-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 8px; background: var(--warn); }
.upd-h { margin-top: 36px; font-size: 1.2rem; }
.upd-problems { margin: 14px 0 0; padding-left: 1.2em; }
.upd-problems li { margin-bottom: 4px; }
.upd-outcome { margin: 14px 0 0; padding: 10px 14px; border-radius: 8px; background: #EEF5F2; color: var(--green); font-weight: 600; }
.upd-outcome.bad { background: var(--warn-bg); color: var(--warn); }
.upd-rec { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; overflow-x: auto; }
.upd-rec h3 { font-size: 1rem; margin: 0 0 8px; }
.upd-rec pre { margin: 4px 0 0; font-family: var(--mono); font-size: 0.74rem; line-height: 1.5; white-space: pre; }
.upd-rec mark { background: #FFE9A8; color: inherit; }
