/* Original Mickai gate worksheet. Scoped to the additional lab. */
.gate-lab { --gate-paper: #f3eee2; --gate-ink: #24291f; }
.gate-notice { border-left: 4px solid var(--lab-gold); padding: 18px 22px; margin: 20px 0 28px; max-width: 100ch; line-height: 1.65; background: #20251a; }
.gate-notice strong { display: block; color: #f7efd9; margin-bottom: 4px; }
.gate-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; }
.gate-panel { min-width: 0; border: 1px solid var(--lab-line); padding: 24px; border-radius: 5px; background: #171b13; }
.gate-panel h3, .gate-result h3 { margin: 0 0 20px; color: #f4ebd5; font: 600 1.2rem/1.4 var(--sans, system-ui); }
.gate-panel .lab-bar { align-items: end; }
.gate-panel select { width: 100%; }
.gate-panel .lab-bar label { width: 100%; }
.gate-panel textarea { min-height: 390px; }
.gate-panel fieldset { border: 1px solid #5c624e; margin: 0 0 24px; padding: 15px 18px 20px; min-width: 0; }
.gate-panel legend { padding: 0 7px; font-weight: 600; color: #eed499; }
.gate-lab .gate-check { display: flex; gap: 12px; align-items: center; min-height: 44px; cursor: pointer; font-size: .95rem; font-weight: 400; }
.gate-check input { width: 20px; height: 20px; margin: 0; flex: 0 0 auto; accent-color: #dfbb65; }
.gate-panel input[type="number"] { display: block; margin-top: 9px; }
.gate-lesson { padding: 14px; border-left: 2px solid #ae924d; color: #e5dabe; line-height: 1.65; }
.gate-task { color: var(--gate-ink); background: var(--gate-paper); padding: 22px; border-radius: 3px; }
.gate-task .lab-kicker { color: #75561c; }
.gate-task ol { padding-left: 20px; margin: 8px 0 0; display: grid; gap: 12px; line-height: 1.65; }
.gate-result { border: 1px solid #6b5b37; padding: 24px; margin-top: 24px; background: #191d14; }
.gate-result-head { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; }
.gate-result-head h3 { margin-bottom: 0; }
.gate-verdict { border: 1px solid #9d957f; padding: 8px 14px; font: 600 .9rem/1.5 var(--mono, monospace); }
.gate-verdict[data-decision="allow"] { color: #d8e7b5; border-color: #a5b776; }
.gate-verdict[data-decision="needs_approval"] { color: #ffe0a0; border-color: #c6a155; }
.gate-verdict[data-decision="deny"] { color: #ffcdc0; border-color: #cf9b8d; }
.gate-warning { color: #ffe0a0; line-height: 1.6; }
.gate-warning:empty { display: none; }
.gate-trace { list-style: none; padding: 0; margin: 20px 0 0; }
.gate-trace li { display: grid; grid-template-columns: minmax(140px, .6fr) minmax(0, 1.4fr); gap: 16px; border-top: 1px solid #434c35; padding: 14px 0; line-height: 1.6; }
.gate-trace strong { font: 500 .8rem/1.7 var(--mono, monospace); color: #ddc78b; overflow-wrap: anywhere; }
.gate-trace span { color: #e0ddcf; overflow-wrap: anywhere; }
.gate-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.gate-table caption { text-align: left; padding: 10px 0; color: var(--lab-muted); }
.gate-table th, .gate-table td { text-align: left; border-bottom: 1px solid #565b47; padding: 12px 14px; min-width: 140px; }
.gate-table th { color: #efdcaa; font-weight: 500; }
.gate-lab code { overflow-wrap: anywhere; }
.p-labs .lab-jump:has(a[href="#agent-gate-lab"]) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 850px) { .gate-layout { grid-template-columns: 1fr; } .p-labs .lab-jump:has(a[href="#agent-gate-lab"]) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .gate-panel, .gate-result { padding: 18px; } .gate-trace li { grid-template-columns: 1fr; gap: 4px; } .gate-lab .lab-actions .lab-button { flex: 1 1 45%; } }
@media (forced-colors: active) { .gate-notice, .gate-panel, .gate-task, .gate-result, .gate-verdict { background: Canvas; color: CanvasText; border: 1px solid CanvasText; } .gate-lab :is(h3, strong, span, legend, .gate-warning, .lab-kicker) { color: CanvasText; } .gate-lab :focus-visible { outline: 3px solid Highlight; } }
