/* Hayabusa lessons and terminal simulation; shared Kansa classes style the lab shells. */
.hy-intro,.hy-note,.hy-cards,.hy-flow,.hy-lab{--hy-blue:#246cb6;--hy-border:#bed8f3;--hy-surface:#edf5ff;--hy-ink:#203c60}
.md-typeset .hy-intro,.md-typeset .hy-note,.hy-flow{padding:1rem;border:1px solid var(--hy-border);border-radius:12px;margin:1rem 0;background:var(--md-default-bg-color)}
.md-typeset .hy-intro{border-left:4px solid var(--hy-blue);background:linear-gradient(115deg,var(--hy-surface),var(--md-default-bg-color))}.md-typeset .hy-intro h2{margin-top:.5rem}.hy-kicker,.hy-cards>*>span{display:block;color:var(--hy-blue);font-size:.65rem;letter-spacing:.05em;font-weight:750;text-transform:uppercase}
.hy-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;margin:1rem 0}.hy-cards--two{grid-template-columns:repeat(2,minmax(0,1fr))}.hy-cards>*{min-width:0;padding:1rem;border:1px solid var(--hy-border);border-radius:10px;background:var(--md-default-bg-color);color:var(--hy-ink)}.hy-cards strong{display:block;font-size:.88rem;margin:.4rem 0}.hy-cards p{font-size:.77rem;line-height:1.65;margin:0}.hy-cards small{display:block;margin-top:.65rem;font-size:.65rem}.hy-cards>a:hover,.hy-cards>a:focus-visible{background:var(--hy-surface);box-shadow:inset 0 3px var(--hy-blue)}
.hy-note>summary{font-weight:700;cursor:pointer}.hy-flow-head{display:flex;gap:.7rem;align-items:center;justify-content:space-between;flex-wrap:wrap}.md-typeset .hy-flow ol{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.55rem;list-style:none!important;margin:1rem 0!important;padding:0!important}.hy-flow li{position:relative;padding:.8rem;border:1px solid var(--hy-border);border-radius:9px;margin:0!important;transition:transform .4s,background .4s,border-color .4s}.hy-flow li b,.hy-flow li span{display:block;font-size:.72rem}.hy-flow li b{color:var(--hy-blue);margin-bottom:.3rem}.hy-flow li[data-active=true]{transform:translateY(-4px);background:var(--hy-surface);border-color:var(--hy-blue);box-shadow:inset 0 3px var(--hy-blue)}.hy-flow p{font-size:.75rem;min-height:2.5em;margin:0}
.hy-flow button,.hy-lab button{font:inherit;font-size:.72rem;min-height:2.2rem;padding:.45rem .7rem;border:1px solid var(--hy-blue);border-radius:6px;background:var(--md-default-bg-color);color:var(--hy-blue);cursor:pointer}.hy-lab button:hover:not(:disabled),.hy-flow button:hover{background:var(--hy-surface)}.hy-lab button:disabled{opacity:.45;cursor:not-allowed}.hy-lab :is(button,input,select,textarea,summary):focus-visible,.hy-flow button:focus-visible{outline:3px solid var(--hy-blue);outline-offset:3px}
.hy-lab [hidden]{display:none!important}.hy-case{border:1px solid var(--hy-border);border-radius:10px;padding:1rem;background:linear-gradient(115deg,var(--hy-surface),var(--md-default-bg-color));margin-bottom:1rem}.md-typeset .hy-lab h4{font-size:.95rem;margin:.3rem 0 .7rem;color:var(--hy-ink)}.hy-case p{font-size:.78rem;line-height:1.65}.hy-case small{font-size:.65rem;line-height:1.6;display:block}.hy-case-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.7rem;margin:1rem 0}.hy-case-facts span{font-size:.7rem}.hy-case-facts b{display:block;color:var(--hy-blue);margin-bottom:.3rem}
.md-typeset .hy-stages{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));list-style:none;margin:1rem 0;padding:0;gap:.35rem}.hy-stages li{margin:0!important}.hy-stages button{width:100%;padding:.4rem}.hy-stages button[aria-current=step]{background:var(--hy-blue);color:white}.hy-stages button[data-complete=true]:not([aria-current=step]){border-color:#32775d;box-shadow:inset 0 -3px #32775d}.hy-stages span{display:block;font-size:.64rem}
/* Keep the task above a full-width workspace, as in the Chainsaw lab. */
.hy-lab{container-type:inline-size}
.hy-workspace{display:flex;flex-direction:column;gap:.7rem}
.hy-workspace>*{min-width:0;min-height:0}
.hy-task{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 .8rem;padding:.85rem;background:var(--hy-surface);border:1px solid var(--hy-border);border-radius:9px}
.hy-task>:is(.hy-kicker,h4,[data-hy-instruction],.hy-command-card,.hy-feedback){grid-column:1/-1}
.hy-task p,.hy-task details{font-size:.75rem;line-height:1.65}
.hy-task>p{margin:.4rem 0}
.hy-why{align-self:start;border-left:3px solid var(--hy-blue);padding-left:.65rem}
.hy-command-card{display:flex;align-items:flex-start;gap:.5rem;margin:.5rem 0}
.hy-task .hy-command-card code{flex:1;min-width:0;padding:.6rem;background:var(--md-default-bg-color);border:1px solid var(--hy-border);border-radius:6px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:.72rem}
.hy-command-card button{display:grid;place-items:center;flex:0 0 2.2rem;padding:.4rem}
.hy-command-card svg{width:1.1rem;height:1.1rem}
.md-typeset .hy-task details{padding:0;margin:.5rem 0;border:1px solid var(--hy-border);border-radius:8px;background:var(--md-default-bg-color);box-shadow:none;overflow:hidden}
.md-typeset .hy-task summary{margin:0;padding:.65rem 2rem .65rem .8rem;background:var(--md-default-bg-color);font-size:.75rem;font-weight:700;cursor:pointer}
.md-typeset .hy-task summary::before{display:none}
.hy-task details p{margin:.7rem .8rem}
.hy-feedback{padding:.6rem .7rem;border:1px solid var(--hy-border);border-radius:7px;background:var(--md-default-bg-color)}
.hy-feedback[data-state=success]{border-color:#32775d}
.hy-feedback[data-state=error]{border-left:4px solid #b75435}
.hy-work-area{display:flex;flex-direction:column;height:clamp(28rem,68dvh,42rem);min-width:0;background:var(--md-default-bg-color)}
.hy-tabs{display:flex;gap:.2rem;padding:.35rem;margin-bottom:.6rem;border:1px solid var(--hy-border);border-radius:8px;background:var(--hy-surface);flex:none}
.hy-tabs button{flex:1;min-width:0;padding:.35rem .25rem;border-color:transparent;background:transparent;color:var(--hy-ink);font-size:.68rem}
.hy-tabs button[aria-selected=true]{background:var(--md-default-bg-color);border-color:var(--hy-blue);box-shadow:inset 0 -2px var(--hy-blue)}
.hy-work-area>[data-hy-panel]{flex:1;min-height:0;min-width:0;margin:0;overflow:auto;overscroll-behavior:contain}
.hy-work-area .hy-panel-terminal{display:flex;flex-direction:column;overflow:visible}
.hy-terminal{display:flex;flex-direction:column;flex:1;min-height:0;border:1px solid #454545;border-radius:8px;overflow:hidden;background:#0c0c0c;color:#ddd;box-shadow:0 2px 5px #0002}
.hy-terminal-bar{display:flex;align-items:stretch;height:40px;padding:8px 0 0 8px;background:#333;font:12px 'Segoe UI',sans-serif;color:#ddd;flex:none}
.hy-terminal-tab{display:flex;align-items:center;gap:9px;flex:1;max-width:240px;min-width:0;padding:0 10px;border-radius:8px 8px 0 0;background:#0c0c0c}
.hy-terminal-tab strong{font-size:12px;font-weight:400;color:#f1f1f1}
.hy-cmd-icon{flex:none;font:8px/1.1 Consolas,'Courier New',monospace;border:1px solid #bbb;padding:0 1px}
.hy-tab-close{margin-left:auto}
.hy-tab-tools{display:flex;align-items:center;gap:18px;padding:0 16px}
.hy-window-tools{display:flex;align-items:stretch;margin:-8px 0 0 auto;color:#aaa}
.hy-window-tools>span{display:grid;place-items:center;width:46px}
.hy-terminal-body{flex:1;min-height:0;padding:8px 6px;overflow:auto;overflow-anchor:none;scrollbar-color:#777 #0c0c0c}
.md-typeset .hy-terminal pre{height:auto;overflow:visible;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;font:16px/1.5 Consolas,'Courier New',monospace;white-space:pre-wrap;word-break:break-all;overflow-wrap:normal;color:#ddd;background:transparent;font-variant-ligatures:none}
.md-typeset .hy-terminal .hy-terminal-command{word-break:break-all;overflow-wrap:normal}
.md-typeset .hy-terminal .hy-terminal-banner{white-space:pre;overflow:auto;overflow-wrap:normal;font-size:16px;line-height:1.1;color:#00ff00;margin:0}
.md-typeset .hy-terminal .hy-terminal-notice{color:#ffaf00}
.hy-terminal form[data-hy-form]{position:relative;display:block;margin:0;border:0;padding:0;background:#0c0c0c}
.hy-terminal [data-hy-form] label{position:absolute;top:0;left:0;font:16px/1.5 Consolas,'Courier New',monospace;color:#ddd}
.hy-terminal textarea{display:block;width:100%;min-width:0;min-height:1.5em;margin:0;padding:0;resize:none;border:0;border-radius:0;background:#0c0c0c;color:#ddd;caret-color:#eee;font:16px/1.5 Consolas,'Courier New',monospace;text-indent:var(--hy-prompt-width,18ch);white-space:pre-wrap;word-break:break-all;overflow-wrap:normal;overflow:hidden}
.hy-terminal textarea:focus-visible{outline:0;background:#0c0c0c}
.hy-terminal-actions{display:flex;align-items:center;gap:.7rem;justify-content:space-between;padding:.5rem .2rem 0;flex:none}
.md-typeset .hy-terminal-actions p{margin:0;font-size:.66rem;line-height:1.6}
.hy-terminal-actions button{flex:none;font-size:.65rem}
/* Native dialoguer-style prompts stay in the console transcript. */
.hy-terminal .hy-wizard{margin:0;padding:0;border:0;border-radius:0;background:transparent;color:#ddd;font:16px/1.5 Consolas,'Courier New',monospace;white-space:pre-wrap;word-break:break-all;font-variant-ligatures:none}
.hy-terminal .hy-wizard:focus-visible{outline:0}
.hy-work-area:has(.hy-wizard:not([hidden])){height:clamp(36rem,80dvh,46rem)}
.hy-wizard-question{font-weight:700}
.hy-wizard [role=option]{cursor:pointer}
.hy-wizard [role=option][aria-selected=true]{color:#0ff}
.hy-green{color:#00ff00}.hy-orange{color:#ffaf00}.hy-yellow{color:#ffff00}.hy-red{color:#ff0000}.hy-cyan{color:#00ffff}
.hy-terminal-actions{flex-wrap:wrap}
.hy-terminal-actions>p{flex:1;min-width:12rem}
.hy-console-keys{display:flex;align-items:center;gap:.6rem;flex-basis:100%;order:3;min-width:0;font-size:.65rem;line-height:1.6}
.hy-console-keys>span{flex:1;min-width:0}
.hy-console-keys>div{display:flex;gap:.25rem;flex:none}
.hy-console-keys button{min-width:2rem;padding:.3rem .45rem;font-size:.65rem}
.hy-auto-note{align-self:center;color:var(--hy-ink);font-size:.66rem}
@container(max-width:600px){.hy-console-keys{flex-wrap:wrap}.hy-console-keys>span{flex-basis:100%}}
.hy-source-fields>*{min-width:0}
.hy-source-fields .hy-evidence-check{align-self:start}
.hy-source-fields .hy-source{margin:0}
.hy-viewer [data-hy-inspected]{color:var(--hy-blue);font-size:.68rem}
.hy-source-fields{display:grid;gap:.7rem;margin-top:.8rem}
@container(min-width:650px){.hy-source-fields:has(.hy-source:not([hidden])){grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}}
@container(max-width:700px){.hy-task{grid-template-columns:minmax(0,1fr)}.hy-work-area{height:clamp(28rem,68dvh,38rem)}}
@media(max-width:800px){.hy-window-tools{display:none}.hy-terminal-actions{align-items:flex-start;flex-wrap:wrap}}

.hy-viewer,.hy-decision,.hy-handover{border:1px solid var(--hy-border);border-radius:9px;padding:.85rem;background:var(--md-default-bg-color)}.hy-viewer-bar{display:flex;justify-content:space-between;gap:.5rem;flex-wrap:wrap;padding-bottom:.65rem;border-bottom:1px solid var(--hy-border);font-size:.74rem}.hy-viewer-bar span{font-size:.62rem;color:var(--hy-blue)}.hy-viewer p,.hy-decision p,.hy-handover p,.hy-handover dl{font-size:.75rem;line-height:1.6}.hy-viewer label{font-size:.72rem}.hy-viewer select,.hy-viewer input{padding:.45rem;border:1px solid var(--hy-border);border-radius:5px;background:var(--md-default-bg-color);color:var(--md-default-fg-color);font:inherit;max-width:100%}.hy-table-wrap{overflow:auto;max-width:100%;margin:.6rem 0}.hy-lab .hy-table-wrap table{display:table;width:100%;min-width:440px;margin:0;font-size:.65rem}.hy-table-wrap caption{font-size:.62rem;text-align:left;padding:.4rem}.hy-table-wrap td,.hy-table-wrap th{padding:.5rem!important}.hy-table-wrap tr[data-selected=true]{background:var(--hy-surface)}.hy-table-wrap button{font-size:.65rem;padding:.3rem;min-height:2rem}.hy-table-wrap td small{display:block}.hy-source{background:var(--hy-surface);padding:.75rem;border-radius:7px;margin:.8rem 0}.hy-source pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.66rem;background:var(--md-default-bg-color);padding:.65rem;border-radius:5px}.hy-evidence-check fieldset{border:1px solid var(--hy-border);padding:.75rem;border-radius:8px}.hy-evidence-check legend{font-size:.72rem;font-weight:650}.hy-evidence-check label{display:grid;gap:.3rem;margin:.5rem 0}.hy-evidence-check small{display:block;font-size:.63rem}.hy-decision button{display:block;text-align:left;width:100%;margin:.65rem 0;line-height:1.65}.hy-decision button[aria-pressed=true]{box-shadow:inset 4px 0 var(--hy-blue)}.hy-handover dt{font-weight:750;color:var(--hy-blue);margin-top:.6rem}.hy-handover dd{margin-left:0}.hy-lab-footer{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:.6rem;border-top:1px solid var(--hy-border);margin-top:1rem;padding-top:.8rem}.hy-lab-footer strong{font-size:.7rem}.hy-lab-footer>div{display:flex;gap:.4rem;flex-wrap:wrap}
[data-md-color-scheme=slate] :is(.hy-intro,.hy-note,.hy-cards,.hy-flow,.hy-lab){--hy-blue:#8bbef3;--hy-border:#405b78;--hy-surface:#1d3046;--hy-ink:#d7e8fa}[data-md-color-scheme=slate] .hy-stages button[aria-current=step]{background:#315f8c;color:#fff}
@media(max-width:1000px){.hy-workspace{grid-template-columns:1fr}.hy-task{display:block}.hy-case-facts{grid-template-columns:1fr}.md-typeset .hy-flow ol{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.hy-cards,.hy-cards--two{grid-template-columns:1fr}.md-typeset .hy-flow ol{grid-template-columns:1fr}.md-typeset .hy-stages{grid-template-columns:repeat(3,minmax(0,1fr))}.hy-case,.hy-task,.hy-viewer,.hy-decision,.hy-handover{padding:.7rem}.hy-terminal-body{padding:.55rem}}
/* Override the site's generic ol:not([hidden]) flow-root rule inside this widget. */
.md-typeset ol.hy-stages{display:grid}
body .md-typeset .hy-intro h2{margin-top:.5rem!important}
body .md-typeset .hy-lab h4{margin:.3rem 0 .7rem!important;color:var(--hy-ink)!important}
.hy-lab{padding:.5rem}
@media(prefers-reduced-motion:reduce){.hy-flow li{transition:none!important;transform:none!important}}

.md-typeset .hy-terminal .hy-terminal-table{white-space:pre;overflow:auto;word-break:normal;overflow-wrap:normal}
.md-typeset .hy-terminal .hy-terminal-heading{color:#ddd}

/* Use Kansa's shared teaching colours across both lab routes and site themes. */
.kfl-interactive .hy-lab,[data-md-color-scheme=slate] .kfl-interactive .hy-lab{--hy-blue:var(--kfl-blue);--hy-border:var(--kfl-border);--hy-surface:var(--kfl-surface);--hy-ink:var(--kfl-ink);color:var(--kfl-ink)}
.kfl-interactive .hy-stages button[aria-current=step]{border-color:var(--kfl-action);background:var(--kfl-action);color:var(--kfl-action-ink)}
[data-hayabusa-full] .hy-full-plan{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem;margin:1rem 0}
.hy-full-plan>div{min-width:0;padding:.8rem;border:1px solid var(--kfl-border);border-radius:9px;background:var(--kfl-surface);color:var(--kfl-ink)}
.hy-full-plan strong,.hy-full-plan span,.hy-full-plan small{display:block}
.hy-full-plan strong{color:var(--kfl-blue);font-size:.76rem}
.hy-full-plan span{margin:.35rem 0;font-size:.74rem;line-height:1.6}
.hy-full-plan small{font-size:.64rem;line-height:1.6}
.hy-full-plan code{overflow-wrap:anywhere}
[data-hayabusa-full] .hy-full-win{margin:.8rem 0;padding:.65rem .8rem;border-left:3px solid var(--kfl-blue);border-radius:0 6px 6px 0;background:var(--kfl-surface);color:var(--kfl-ink);font-size:.73rem;line-height:1.6}
[data-hayabusa-full] .hy-field-guide{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.6rem;margin:.8rem 0}
.hy-field-guide>div{min-width:0;padding:.7rem;border:1px solid var(--kfl-border);border-radius:7px;background:var(--kfl-surface)}
.hy-field-guide dt{color:var(--kfl-blue);font-size:.73rem;font-weight:700}
.md-typeset .hy-field-guide dd{margin:.3rem 0 0;font-size:.72rem;line-height:1.6;color:var(--kfl-ink)}
@media(max-width:700px){[data-hayabusa-full] :is(.hy-full-plan,.hy-field-guide){grid-template-columns:1fr}}
