/* USB Detective guides and a compact Community-style teaching workspace. */
.md-content:has([data-section-progress-label="USB Detective"]) .md-typeset__table table { min-width:640px; }
.ud-table-hint { display:none; }
.ud-guide,.ud-lab { --ud-blue:var(--kfl-blue,#246cb6); --ud-ink:var(--kfl-ink,#203c60); --ud-line:var(--kfl-border,#bed8f3); --ud-tint:var(--kfl-surface,#edf5ff); --ud-paper:var(--md-default-bg-color,#fff); --ud-good:#176035; --ud-good-bg:#eef9f1; --ud-error:#991b1b; --ud-error-bg:#fff1f2; color:var(--ud-ink); }
.ud-guide *,.ud-lab * { box-sizing:border-box; }
.ud-lab [hidden],.ud-guide [hidden] { display:none!important; }
.ud-kicker { display:block; color:var(--ud-blue); font-size:.62rem; font-weight:700; letter-spacing:.035em; }
.ud-intro,.ud-next,.ud-callout { margin:18px 0; padding:16px 18px; border:1px solid var(--ud-line); border-left:4px solid var(--ud-blue); border-radius:8px; background:var(--ud-tint); }
.ud-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:20px 0; }
body .md-typeset .ud-cards :is(a,article) { padding:16px; border:1px solid var(--ud-line); border-radius:8px; color:var(--ud-ink); background:var(--ud-paper); }
.ud-cards :is(a,article)>span { display:block; font-size:.63rem; font-weight:650; color:var(--ud-blue); }
.ud-cards strong { display:block; margin-top:7px; font-size:.83rem; }
.ud-cards p { margin:7px 0 0; font-size:.73rem; line-height:1.75; }
body .md-typeset .ud-help { border:1px solid var(--ud-line); border-radius:7px; background:var(--ud-paper); color:var(--ud-ink); box-shadow:none; }
body .md-typeset .ud-help>summary { background:var(--ud-tint); color:var(--ud-ink); }
body .md-typeset .ud-help>summary::before { display:none; }
.ud-flow { margin:20px 0; padding:16px; border:1px solid var(--ud-line); border-radius:8px; background:var(--ud-paper); }
.ud-flow-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; font-size:.8rem; }
.md-typeset .ud-flow ol { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; list-style:none; margin:16px 0; padding:0; }
.ud-flow li { position:relative; padding:12px; margin:0!important; border:1px solid var(--ud-line); border-radius:7px; transition:background .4s,box-shadow .4s; }
.ud-flow li:not(:last-child)::after { content:'›'; position:absolute; right:-13px; top:35%; color:var(--ud-blue); }
.ud-flow li strong,.ud-flow li span { display:block; }
.ud-flow li strong { font-size:.76rem; }
.ud-flow li span { margin-top:6px; font-size:.68rem; line-height:1.7; }
.ud-flow [data-active=true] { background:var(--ud-tint); box-shadow:inset 0 3px var(--ud-blue); }
.ud-flow>p { font-size:.74rem; line-height:1.7; min-height:3em; }
.ud-lab { border:1px solid var(--ud-line); border-radius:8px; overflow:hidden; background:var(--ud-paper); }
.ud-lab button,.ud-flow button { min-height:42px; padding:8px 12px; border:1px solid var(--ud-blue); border-radius:5px; color:var(--ud-blue); background:var(--ud-paper); cursor:pointer; font:600 .7rem/1.6 var(--md-text-font-family); }
.ud-lab button:disabled { opacity:.55; cursor:default; }
.ud-lab :is(button,input,select,summary,textarea,[tabindex]):focus-visible,.ud-guide :is(a,button,summary):focus-visible { outline:3px solid var(--ud-blue); outline-offset:3px; }
.ud-brief,.ud-coach { padding:16px 18px; background:var(--ud-tint); }
body .md-typeset .ud-lab h4 { margin:5px 0 9px; color:var(--ud-ink); font-size:.87rem; line-height:1.5; }
body .md-typeset .ud-lab h5 { margin:18px 0 8px; color:var(--ud-ink); font-size:.8rem; }
body[data-md-color-scheme] .md-typeset .ud-lab p { color:var(--ud-ink); font-size:.74rem; line-height:1.75; }
.ud-case-facts { display:grid; grid-template-columns:.75fr 1.2fr 1.3fr; gap:10px; margin:14px 0; }
.ud-case-facts>div { padding:10px 12px; border:1px solid var(--ud-line); border-radius:6px; background:var(--ud-paper); }
.ud-case-facts dt { color:var(--ud-blue); font-size:.64rem; font-weight:700; }
.ud-case-facts dd { margin:4px 0 0; font-size:.73rem; line-height:1.65; }
body .md-typeset .ud-lab details.ud-about { padding:0 12px; margin:12px 0; border:1px solid var(--ud-line); border-radius:5px; background:var(--ud-paper); color:var(--ud-ink); box-shadow:none; }
body .md-typeset .ud-lab details.ud-about>summary { padding:10px 22px 10px 0; margin:0; background:none; color:var(--ud-blue); font-size:.68rem; }
body .md-typeset .ud-lab details.ud-about>summary::before { display:none; }
.ud-steps { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:5px; padding:10px; border-block:1px solid var(--ud-line); }
.ud-steps button { padding:8px 3px; border-color:var(--ud-line); font-size:.65rem; }
.ud-steps [aria-current=step] { background:var(--kfl-action,#246cb6); color:var(--kfl-action-ink,#fff); }
.ud-steps [data-done=true]:not([aria-current]) { color:var(--ud-good); border-color:var(--ud-good); background:var(--ud-good-bg); }
.ud-steps [data-done=true]::after { content:' \2713'; }
.ud-coach-heading { display:flex; gap:8px; flex-wrap:wrap; align-items:center; justify-content:space-between; }
.ud-case-reminder { color:var(--ud-ink); font-size:.64rem; }
.md-typeset .ud-coach ol { margin:8px 0; padding-left:22px; font-size:.74rem; line-height:1.75; }
body .md-typeset .ud-coach details { margin:10px 0 0; border:1px solid var(--ud-line); background:var(--ud-paper); box-shadow:none; color:var(--ud-ink); }
body .md-typeset .ud-coach details>summary { background:none; color:var(--ud-blue); }
body .md-typeset .ud-lab .ud-caption { margin:12px 14px; font-size:.64rem; }
/* Native surfaces keep the Windows appearance in either site theme. */
.ud-native { margin:12px; border:1px solid #969696; border-radius:2px; color:#111; background:#f0f0f0; font:12px/1.5 'Segoe UI',Arial,sans-serif; }
.ud-titlebar,.ud-subwindow-title { display:flex; align-items:center; gap:6px; padding:5px 7px; background:#fafafa; color:#111; }
.ud-titlebar { min-height:34px; }
.ud-titlebar>img { width:18px; height:20px; flex:none; object-fit:contain; background:#fff; }
.ud-titlebar>span:nth-child(2) { min-width:0; font-size:12px; }
.ud-window-controls { flex:none; margin-left:auto; color:#222; white-space:nowrap; }
.ud-menu { display:flex; gap:2px; padding:1px 3px; border-bottom:2px solid #a4a4a4; background:#f7f7f7; }
body .md-typeset .ud-native .ud-menu details { position:relative; margin:0; padding:0; border:0; box-shadow:none; background:#f7f7f7!important; color:#111; font:12px/1.5 'Segoe UI',Arial,sans-serif; overflow:visible; }
body .md-typeset .ud-native .ud-menu summary { padding:5px 10px; margin:0; min-height:30px; background:#f7f7f7!important; color:#111; list-style:none; cursor:pointer; }
body .md-typeset .ud-native .ud-menu summary::before,body .md-typeset .ud-native .ud-menu summary::after { display:none; }
body .md-typeset .ud-native .ud-menu details[open]>summary { background:#e0eafb!important; }
.ud-menu details>div { position:absolute; top:100%; left:0; z-index:5; width:190px; padding:3px; background:#fff; border:1px solid #aaa; box-shadow:0 3px 8px #0003; }
body .md-typeset .ud-native .ud-menu button { min-height:30px; padding:5px 10px; border:0; border-radius:0; background:transparent; color:#111; font:12px/1.5 'Segoe UI',Arial,sans-serif; }
.ud-menu details>div button { display:block; width:100%; text-align:left; }
.ud-menu button:not(:disabled):hover { background:#e0eafb; }
.ud-grid-scroll { position:relative; overflow:auto; min-height:265px; background:#f0f0f0; }
body .md-typeset .ud-native .ud-grid { display:table; min-width:1150px; width:100%; margin:0; border-collapse:collapse; border:0; border-radius:0; background:#f0f0f0; color:#111; font:12px/1.5 'Segoe UI',Arial,sans-serif; }
body .md-typeset .ud-grid :is(th,td) { padding:3px 6px; border:1px solid #c0c0c0; background:#f0f0f0; color:#111; white-space:nowrap; font-weight:400; min-width:0; }
body .md-typeset .ud-grid thead th { padding:3px 6px; background:#fff; color:#111; font-size:11px; }
body .md-typeset .ud-native .ud-grid button { min-height:34px; border:0; background:transparent; color:#111; padding:2px 0; font:400 12px/1.5 'Segoe UI',Arial,sans-serif; text-decoration:none; white-space:nowrap; }
body .md-typeset .ud-grid tr[data-selected=true]>th { background:#0078d7; }
body .md-typeset .ud-grid tr[data-selected=true]>th button { color:#fff; }
body .md-typeset .ud-grid td.ud-mid,.ud-mid { background:#fff0a2; color:#111; }
body .md-typeset .ud-grid td.ud-low,.ud-low { background:#ffc1c9; color:#111; }
body .md-typeset .ud-grid td.ud-high,.ud-high { background:#c5eed0; color:#111; }
.ud-empty { padding:26px 12px; }
.ud-choose-input { width:455px; max-width:100%; margin:0 auto; border:1px solid #909090; background:#f0f0f0; box-shadow:0 3px 10px #0002; }
.ud-subwindow-title { min-height:30px; border-bottom:1px solid #bbb; font:12px/1.5 'Segoe UI',Arial,sans-serif; }
.ud-subwindow-title>img { flex:none; width:16px; height:17px; object-fit:contain; background:#fff; }
.ud-subwindow-title>span:last-child { margin-left:auto; }
.ud-choose-body { display:grid; grid-template-columns:minmax(0,1fr) 125px; gap:10px; align-items:center; padding:4px; background:#fff; }
.ud-choose-body>div { display:grid; gap:4px; }
body .md-typeset .ud-choose-body button { min-height:48px; width:100%; padding:8px; border:1px solid #aaa; border-radius:0; background:#e5e5e5; color:#111; font:12px/1.4 'Segoe UI',Arial,sans-serif; }
body .md-typeset .ud-choose-body button:first-child { outline:1px solid #0078d7; outline-offset:-2px; }
.ud-choose-body>img { width:118px; height:125px; object-fit:contain; background:#fff; }
.ud-native-bottom { display:grid; grid-template-columns:minmax(0,1fr) 220px; gap:6px; padding:4px; border-top:1px solid #aaa; }
body .md-typeset .ud-native pre { min-height:88px; padding:3px; margin:0; max-height:135px; overflow:auto; border:1px solid #aaa; background:#f0f0f0; color:#111; white-space:pre-wrap; overflow-wrap:anywhere; font:11px/1.6 'Segoe UI',Arial,sans-serif; }
body .md-typeset .ud-native .ud-legend { min-width:0; display:grid; grid-template-columns:1fr 1fr; gap:7px; align-content:start; padding:5px 7px 7px; margin:0; border:1px solid #bbb; background:#f0f0f0; }
.ud-legend legend { padding:0 3px; color:#111; font:11px/1.4 'Segoe UI',Arial,sans-serif; }
.ud-legend span { padding:0 2px; text-align:center; color:#111; border:1px solid #aaa; font:11px/1.4 'Segoe UI',Arial,sans-serif; align-self:center; }
.ud-panel { margin:16px 12px; padding:16px; border:1px solid var(--ud-line); border-left:4px solid var(--ud-blue); border-radius:7px; background:var(--ud-paper); scroll-margin-top:5rem; }
.ud-selected-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:12px 0; }
.ud-selected-facts>div { padding:10px; background:var(--ud-tint); border-radius:5px; }
.ud-selected-facts dt,.ud-source-list dt,.ud-handover-facts dt { font-size:.7rem; font-weight:700; }
.ud-selected-facts dd,.ud-source-list dd,.ud-handover-facts dd { margin:4px 0 0; font-size:.72rem; line-height:1.8; overflow-wrap:anywhere; }
.ud-source-list>div,.ud-handover-facts>div { padding:10px 0; border-bottom:1px solid var(--ud-line); }
.ud-panel fieldset { min-width:0; margin:15px 0 0; padding:12px; border:1px solid var(--ud-line); border-radius:5px; }
.ud-panel legend { padding:0 6px; font-size:.74rem; font-weight:700; }
.ud-panel fieldset button { display:block; width:100%; text-align:left; margin:8px 0; font-weight:500; }
.ud-panel [aria-pressed=true] { color:var(--ud-good); border-color:var(--ud-good); background:var(--ud-good-bg); }
.ud-timeline { display:grid; grid-template-columns:1fr 1.6fr 1fr; gap:12px; margin:14px 0; align-items:stretch; }
.ud-timeline>span { padding:12px; border:1px solid var(--ud-line); border-radius:5px; background:var(--ud-tint); font-size:.68rem; line-height:1.8; }
.ud-timeline b { display:block; }
.ud-timeline .ud-window { border:2px solid var(--ud-blue); }
.ud-timeline [data-active=true] { box-shadow:inset 0 4px var(--ud-blue); animation:ud-trace .65s ease-out; }
@keyframes ud-trace { from { transform:translateY(5px); opacity:.5; } to { transform:none; opacity:1; } }
.ud-panel label { display:block; margin-top:14px; font-size:.74rem; font-weight:650; }
.ud-panel textarea,.ud-panel select { display:block; width:100%; padding:9px; margin:6px 0 12px; border:1px solid var(--ud-line); border-radius:5px; background:var(--ud-paper); color:var(--ud-ink); font:400 .74rem/1.7 var(--md-text-font-family); }
.ud-panel textarea { resize:vertical; }
.ud-panel textarea::placeholder { color:var(--ud-ink); opacity:.8; }
.ud-panel small { display:block; font-size:.64rem; line-height:1.8; }
.ud-downloads { display:flex; gap:9px; flex-wrap:wrap; margin-top:14px; }
body .md-typeset .ud-lab .ud-feedback { margin:14px 12px; padding:12px; border:1px solid var(--ud-line); border-left:4px solid var(--ud-blue); border-radius:5px; color:var(--ud-ink); background:var(--ud-tint); }
body .md-typeset .ud-lab .ud-feedback[data-state=error] { color:var(--ud-error); border-color:var(--ud-error); background:var(--ud-error-bg); }
.ud-feedback[data-state=error]::before { content:'! '; font-weight:700; }
body .md-typeset .ud-lab .ud-feedback[data-state=success],.ud-complete { color:var(--ud-good); border-color:var(--ud-good); background:var(--ud-good-bg); }
.ud-feedback[data-state=success]::before { content:'\2713 '; font-weight:700; }
.ud-complete { margin-top:15px; padding:14px; border:1px solid; border-radius:6px; }
body .md-typeset .ud-lab .ud-complete p { color:var(--ud-good); }
.ud-footer { display:flex; gap:12px; align-items:center; flex-wrap:wrap; padding:12px; background:var(--ud-tint); border-top:1px solid var(--ud-line); }
.ud-footer span { font-size:.68rem; }.ud-footer button:last-child { margin-left:auto; }
.ud-dialog { width:min(680px,calc(100vw - 24px)); max-height:88vh; overflow:auto; padding:0; border:1px solid #888; border-radius:2px; background:#f0f0f0; color:#111; box-shadow:0 8px 35px #0005; }
.ud-dialog::backdrop { background:#102d4d99; }
body .md-typeset .ud-native-dialog .ud-subwindow-title h4 { flex:1; margin:0; font:400 12px/1.5 'Segoe UI',Arial,sans-serif; color:#111; }
body .md-typeset .ud-native-dialog button { min-height:34px; padding:5px 12px; border:1px solid #aaa; border-radius:2px; color:#111; background:linear-gradient(#fff,#e7e7e7); font:12px/1.5 'Segoe UI',Arial,sans-serif; }
body .md-typeset .ud-native-dialog .ud-subwindow-title button { min-height:24px; padding:0 8px; border:0; background:transparent; font-size:17px; }
.ud-native-dialog>.ud-subwindow-title { position:sticky; top:0; z-index:2; }
.ud-dialog-body { padding:12px; }
body .md-typeset .ud-native-dialog fieldset { min-width:0; margin:0 0 12px; padding:10px; border:1px solid #bbb; background:#f0f0f0; }
.ud-native-dialog legend { padding:0 4px; color:#111; font:12px/1.5 'Segoe UI',Arial,sans-serif; }
.ud-native-dialog label { display:block; min-width:0; color:#111; font:12px/1.6 'Segoe UI',Arial,sans-serif; }
.ud-native-dialog input,.ud-native-dialog select { display:block; min-width:0; width:100%; padding:5px; margin:3px 0 8px; border:1px solid #aaa; border-radius:0; background:#fff; color:#111; font:12px/1.5 'Segoe UI',Arial,sans-serif; }
.ud-native-dialog input::placeholder { color:#555; opacity:1; }
.ud-case-fields { display:grid; grid-template-columns:1fr 1fr; gap:0 12px; }
.ud-case-folder { grid-column:1/-1; }
.ud-browse-row { display:flex; gap:6px; align-items:start; }.ud-browse-row input { flex:1; }.ud-browse-row button { margin-top:3px; }
.ud-practice-picker { padding:12px; margin:12px 0 16px; border:1px solid #bed8f3; border-left:4px solid #246cb6; border-radius:5px; color:#203c60; background:#edf5ff; }
.ud-practice-picker>strong { font-size:.72rem; }
body .md-typeset .ud-lab .ud-native-dialog p { color:#111; font:12px/1.7 'Segoe UI',Arial,sans-serif; }
body .md-typeset .ud-lab .ud-practice-picker p { color:#203c60; font-size:12px; overflow-wrap:anywhere; }
.ud-dialog-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:10px; }
.ud-stats-dialog { width:min(310px,calc(100vw - 24px)); }
.ud-stats-dialog dl { margin:4px 0; }.ud-stats-dialog dl>div { display:flex; gap:6px; padding:4px 0; font:12px/1.6 'Segoe UI',Arial,sans-serif; }
.ud-stats-dialog dt { font-weight:400; }.ud-stats-dialog dd { margin:0; }
.ud-stats-dialog [data-ud-stats-close] { width:100%; outline:1px solid #0078d7; outline-offset:-2px; }
.ud-sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
[data-md-color-scheme=slate] :is(.ud-guide,.ud-lab) { --ud-blue:#9dccff; --ud-ink:#e3effa; --ud-line:#456b92; --ud-tint:#203b58; --ud-paper:#172b41; --ud-good:#9ce3b3; --ud-good-bg:#183c2d; --ud-error:#fda4af; --ud-error-bg:#411e25; }
.kfl-interactive .ud-lab { --ud-blue:var(--kfl-blue); --ud-ink:var(--kfl-ink); --ud-line:var(--kfl-border); --ud-tint:var(--kfl-surface); --ud-paper:var(--md-default-bg-color); }
/* Use Kansa's live theme tokens for all USB learning surfaces. */
body .md-typeset .ud-hands.kfl-routes>a { color:var(--kfl-ink); background:var(--md-default-bg-color); border-color:var(--kfl-border); }
body .md-typeset .ud-hands.kfl-routes>a:is(:hover,:focus-visible,.is-selected,[aria-current=location]) { color:var(--kfl-ink); background:var(--kfl-surface); border-color:var(--kfl-blue); }
.ud-hands.kfl-interactive>header,.ud-hands.kfl>.cdk-full-lab-heading { background:linear-gradient(115deg,var(--kfl-surface),var(--md-default-bg-color) 85%); border-color:var(--kfl-border); border-top-color:var(--kfl-blue); }
.ud-hands .kfl-case-prompt { border-color:var(--kfl-border); border-left-color:var(--kfl-blue); background:var(--kfl-surface); color:var(--kfl-ink); }
body .md-typeset .ud-hands .kfl-case-prompt p { color:var(--kfl-ink); }
.ud-phase-time { display:block; margin:-.3rem 0 .8rem; color:var(--kfl-blue); font-size:.65rem; line-height:1.6; }
.ud-hands .kfl-decision .susa-knowledge-check__answers button { border-color:var(--kfl-border); background:var(--md-default-bg-color); color:var(--kfl-ink); }
@media(max-width:700px) {
  .ud-cards,.ud-timeline { grid-template-columns:minmax(0,1fr); }
  .md-typeset .ud-flow ol { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ud-flow li:nth-child(2)::after { display:none; }
  .ud-steps { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ud-native { margin:8px; }.ud-title-licence,.ud-window-controls { display:none; }
  .ud-native-bottom { grid-template-columns:minmax(0,1fr); }
  .ud-footer span { order:3; flex-basis:100%; }
  .ud-case-facts,.ud-selected-facts { grid-template-columns:minmax(0,1fr); }
  .ud-case-facts { gap:6px; }.ud-case-facts br { display:none; }
  .ud-choose-body { grid-template-columns:minmax(0,1fr) 70px; gap:4px; }
  .ud-choose-body>img { width:65px; height:70px; }
  .ud-case-fields { grid-template-columns:minmax(0,1fr); }
  body .md-typeset .ud-table-hint { display:block; font-size:.68rem; line-height:1.7; color:var(--md-default-fg-color--light); }
}
@media(prefers-reduced-motion:reduce) { .ud-flow li { transition:none; } .ud-timeline [data-active=true] { animation:none; } }
