/* Learn Tools: realistic tool screens (app/toolscenes.php, played by assets/learn-tools.js) and page styles */
.lt-stage { background: radial-gradient(120% 120% at 15% 0%, color-mix(in srgb, var(--c) 32%, #0f1733) 0%, #0f1733 55%, #0a1026 100%); }

/* ── the screen: designed at 52em wide and scaled to whatever space it gets ── */
.ui { container-type: inline-size; position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; text-align: left; }
.ui-desk { position: absolute; inset: 0; font-size: 7px; font-size: calc(100cqw / 54); line-height: 1.45; font-family: -apple-system, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif; padding: 1.1em; }
.ui-desk * { box-sizing: border-box; margin: 0; padding: 0; }
.ui-desk pre, .ui-term, .ui-hex, .ui-events code, .ui-editor, .ui-console, .ui-logs, .ui-pkts, .ui-box, .ui-input, .ui-filter, .ui-search { font-family: "Cascadia Mono", "Ubuntu Mono", Consolas, Menlo, monospace; }
.ui-win { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: .8em; box-shadow: 0 1.6em 3.2em -1.2em rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.08); }
.ui-bar { display: flex; align-items: center; gap: .6em; height: 2.4em; flex-shrink: 0; padding: 0 .9em; }
.ui-title { flex: 1; text-align: center; font-size: 1em; font-weight: 600; white-space: nowrap; overflow: hidden; }
.ui-ctl { display: flex; gap: .55em; } .ui-ctl i { width: .85em; height: .85em; border-radius: 50%; background: #8b8f98; opacity: .55; } .ui-ctl i:last-child { background: #e5484d; opacity: 1; }
.ui-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ui-dark { background: #101216; color: #d7dae0; } .ui-dark .ui-bar { background: #23262d; color: #e6e8ec; }
.ui-light { background: #fbfbfc; color: #1f2430; } .ui-light .ui-bar { background: #e9eaee; color: #2b303b; border-bottom: 1px solid #d5d7de; }
.ui-float { position: absolute; z-index: 2; } .ui-float .ui-win { box-shadow: 0 2em 4em -1em rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.14); }
.ui-desk b { font-weight: 700; } .ui-desk .g { color: #3ddc84; } .ui-desk .r { color: #ff5d62; } .ui-desk .y { color: #f5c451; } .ui-desk .b { color: #5aa7ff; } .ui-desk .c { color: #52d3d8; } .ui-desk .w { color: #fff; } .ui-desk .dim { color: #8b909c; }
.ui-light .g { color: #128a4a !important; } .ui-light .r { color: #c62a32 !important; } .ui-light .b { color: #1f6fd0 !important; } .ui-light .y { color: #9a6a00 !important; }

/* terminal */
.ui-term { flex: 1; min-height: 0; overflow: hidden; padding: .7em .9em; font-size: 1.02em; position: relative; }
.ui-line { white-space: pre-wrap; overflow-wrap: anywhere; }
.ui-line.hl { background: rgba(255, 93, 98, .14); box-shadow: inset .22em 0 0 #ff5d62; padding-left: .5em; }
.kp { color: #5aa7ff; }
.ui-caret { display: inline-block; width: .6em; height: 1.15em; vertical-align: text-bottom; background: #cfd3da; animation: ui-blink 1.05s steps(1) infinite; }
.typing .tx::after { content: ""; display: inline-block; width: .55em; height: 1.1em; vertical-align: text-bottom; background: currentColor; }
@keyframes ui-blink { 50% { opacity: 0; } }

/* chrome: toolbars, tabs, side lists, tables */
.ui-tools, .ui-tabs, .ui-sub { display: flex; align-items: center; gap: .35em; flex-shrink: 0; padding: .4em .6em; font-size: .95em; white-space: nowrap; overflow: hidden; }
.ui-light .ui-tools { background: #f1f2f5; border-bottom: 1px solid #dcdee5; }
.ui-tools span, .ui-btn { display: inline-flex; align-items: center; gap: .3em; padding: .25em .65em; border-radius: .45em; }
.ui-btn { border: 1px solid rgba(127,135,150,.45); font-weight: 600; transition: transform .12s, filter .12s; }
.ui-btn.go { background: #2f7cf6; border-color: #2f7cf6; color: #fff; }
.ui-btn.clicked { animation: ui-press .32s ease; }
@keyframes ui-press { 45% { transform: scale(.9); filter: brightness(.82); } }
.ui-tabs { gap: 0; padding-bottom: 0; border-bottom: 1px solid rgba(127,135,150,.3); }
.ui-tabs span { padding: .32em .8em; border-radius: .45em .45em 0 0; opacity: .72; }
.ui-tabs span.sel { opacity: 1; font-weight: 700; background: rgba(127,135,150,.16); box-shadow: inset 0 -.18em 0 #2f7cf6; }
.ui-tabs .ui-btn { margin-left: auto; margin-bottom: .25em; opacity: 1; border-radius: .45em; }
.ui-tabs.sm { font-size: .86em; margin-top: .4em; }
.ui-sub span { padding: .1em .6em; opacity: .75; } .ui-sub span.sel { font-weight: 700; opacity: 1; box-shadow: inset 0 -.16em 0 #f2771a; }
.ui-split { flex: 1; min-height: 0; display: grid; }
.ui-side { min-width: 0; overflow: hidden; padding: .45em; background: #eef0f4; border-right: 1px solid #dcdee5; font-size: .93em; }
.ui-side p { padding: .24em .55em; border-radius: .4em; white-space: nowrap; overflow: hidden; }
.ui-side p.sel { background: #d6e4fd; font-weight: 700; color: #14315f; }
.ui-side.dk { background: #17191f; border-color: #2a2e37; } .ui-side.dk p.sel { background: #243450; color: #fff; }
.ui-pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.ui-tr { display: grid; flex-shrink: 0; align-items: center; gap: .5em; padding: .22em .65em; font-size: .9em; border-bottom: 1px solid rgba(127,135,150,.16); white-space: nowrap; }
.ui-tr > span { overflow: hidden; text-overflow: ellipsis; }
.ui-th { font-weight: 700; font-size: .84em; background: rgba(127,135,150,.14); }
.ui-tr.sel { background: #2f7cf6 !important; color: #fff !important; } .ui-tr.sel b { color: #fff !important; }
.ui-hex { flex-shrink: 0; padding: .35em .65em; font-size: .78em; white-space: pre; overflow: hidden; border-top: 1px solid rgba(127,135,150,.3); }
.ui-hd, .ui-desk .hd { font-size: .84em; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .62; padding: .3em .1em .15em; }
.ui-fix { margin: .45em .65em; padding: .35em .6em; border-radius: .45em; background: #e5f6ec; color: #0f6b39; font-size: .9em; font-weight: 600; }
.ui-prog { height: .62em; border-radius: 1em; background: rgba(127,135,150,.25); overflow: hidden; }
.ui-prog i { display: block; height: 100%; width: 100%; border-radius: inherit; background: #2f7cf6; }
.ui-prog.good i { background: #1fa463; }
.ui-progline { display: grid; grid-template-columns: 9em 1fr; align-items: center; gap: .6em; padding: .35em .65em 0; font-size: .9em; }

/* packet window */
.ui-filter { display: flex; align-items: center; gap: .5em; margin: .35em .6em; padding: .24em .6em; border: 1px solid #9ec99a; border-radius: .35em; background: #e6f7e3; flex-shrink: 0; }
.ui-pkts { flex: 1; min-height: 0; overflow: hidden; }
.ui-pkts .ui-tr { font-size: .78em; padding-top: .16em; padding-bottom: .16em; gap: .35em; }
.p-dns { background: #dbeeff; } .p-tcp { background: #e8e8ff; } .p-tls { background: #eef9e2; }
.ui-detail { flex-shrink: 0; padding: .3em .7em; font-size: .8em; border-top: 2px solid #c9ccd6; }
.ui-detail p.sel { background: #d6e4fd; font-weight: 700; }

/* virtual machines */
.ui-vm { display: flex; gap: .55em; align-items: center; padding: .35em .45em; border-radius: .45em; } .ui-vm.sel { background: #d6e4fd; }
.ui-vm i { width: 2.1em; height: 2.1em; border-radius: .4em; background: linear-gradient(135deg, #3b82f6, #1e3a8a); flex-shrink: 0; }
.ui-vm b { display: block; font-size: 1em; white-space: nowrap; } .ui-vm small { display: block; font-size: .82em; color: #5d6576; white-space: nowrap; }
.ui-kv { padding: .55em .8em; font-size: .92em; } .ui-kv span { display: inline-block; width: 7.5em; color: #6a7285; }
.ui-screen { flex: 1; margin: .2em .8em .8em; padding: .55em .7em; border-radius: .45em; background: #0b0d12; color: #cfd3da; font-family: Consolas, monospace; font-size: .86em; }
.ui-screen .ui-prog { margin: .35em 0; background: #2a2f3a; }

/* docker */
.ui-stats { display: flex; gap: 1.4em; align-items: center; padding: .45em .65em; font-size: .92em; color: #9aa1ae; } .ui-stats b { color: #fff; } .ui-stats .ui-btn { margin-left: auto; color: #fff; }
.ui-dot { display: inline-block; width: .75em; height: .75em; border-radius: 50%; border: .14em solid #7b818d; vertical-align: middle; } .ui-dot.on { background: #3ddc84; border-color: #3ddc84; }
.ui-logs { margin-top: auto; padding: .45em .7em; background: #07090d; border-top: 1px solid #2a2e37; font-size: .86em; min-height: 5.4em; }

/* editor */
.ui-editor { flex: 1; min-height: 0; overflow: hidden; padding: .4em 0; background: #1c1f26; font-size: .95em; }
.ui-code { display: grid; grid-template-columns: 3em 1fr; white-space: pre; } .ui-code .ln { text-align: right; padding-right: 1em; color: #5b6170; }
.ui-code i { font-style: normal; } .ui-code .k { color: #c792ea; } .ui-code .s { color: #c3e88d; } .ui-code .f { color: #82aaff; } .ui-code .n { color: #f78c6c; }
.ui-console { flex-shrink: 0; height: 8.4em; overflow: hidden; padding: .2em .8em .4em; border-top: 1px solid #2f333d; background: #101216; font-size: .92em; }

/* web proxy */
.ui-two { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid #c9ccd6; }
.ui-two > div { min-width: 0; padding: .15em .65em; overflow: hidden; } .ui-two > div + div { border-left: 1px solid #dcdee5; }
.ui-two pre { font-size: .8em; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }

/* scanner + dashboards */
.ui-side.tree { background: #fff; }
.ui-flag { display: inline-block; width: .75em; height: .85em; margin-right: .2em; border-radius: .1em; vertical-align: -.05em; } .ui-flag.med { background: #f59e0b; } .ui-flag.low { background: #eab308; } .ui-flag.info { background: #3b82f6; }
.ui-search { margin: .55em .7em .25em; padding: .42em .7em; border: 1px solid #b9bfcc; border-radius: .45em; background: #fff; min-height: 2.35em; }
.ui-meta { display: flex; align-items: center; gap: .5em; padding: 0 .75em; font-size: .88em; color: #596074; } .ui-meta .ui-btn { margin-left: auto; background: #3c8f3c; border-color: #3c8f3c; }
.ui-chart { display: flex; align-items: flex-end; gap: .35em; height: 8.6em; flex-shrink: 0; margin: .5em .75em 0; padding-bottom: 1px; border-bottom: 1px solid #b9bfcc; background: repeating-linear-gradient(to top, transparent 0 2.1em, rgba(127,135,150,.18) 2.1em calc(2.1em + 1px)); }
.ui-chart i { flex: 1; background: #5aa454; transform-origin: bottom; } .ui-chart i.hot { background: #d9534f; }
.ui-events { padding: .35em .75em; overflow: hidden; }
.ui-ev { display: grid; grid-template-columns: 5.6em 1fr; gap: .5em; padding: .22em 0; border-bottom: 1px solid #e3e5eb; font-size: .84em; } .ui-ev code { overflow-wrap: anywhere; } .ui-ev b { background: #fff1a8; }
.ui-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: .55em; padding: .55em .7em; flex-shrink: 0; }
.ui-card { padding: .45em .65em; border: 1px solid #dcdee5; border-radius: .55em; background: #fff; } .ui-card small { display: block; font-size: .8em; color: #6a7285; white-space: nowrap; } .ui-card b { font-size: 1.75em; line-height: 1.2; }
.ui-card.ok b { color: #128a4a; } .ui-card.bad b { color: #c62a32; } .ui-card.warn b { color: #b26b00; }
.ui-lvl { display: inline-block; min-width: 2em; text-align: center; border-radius: .35em; color: #fff !important; } .ui-lvl.low { background: #6b7280; } .ui-lvl.med { background: #d97706; } .ui-lvl.high { background: #dc2626; }

/* password manager */
.ui-modal { position: absolute; z-index: 3; left: 24%; right: 12%; bottom: 8%; padding: .8em 1em; border-radius: .7em; background: #fff; box-shadow: 0 1.6em 3.4em -.8em rgba(0,0,0,.5), 0 0 0 1px #c9ccd6; }
.ui-input { margin: .25em 0 .5em; padding: .35em .6em; border: 1px solid #2f7cf6; border-radius: .4em; min-height: 2.1em; font-size: 1.05em; }
.ui-strength { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6em; font-size: .9em; } .ui-strength b { color: #128a4a; }
.ui-modal .dim { font-size: .84em; margin: .25em 0 .45em; }

/* recipe tool */
.ui-side.ops p { border-bottom: 1px solid #dcdee5; border-radius: 0; } .ui-side.ops .ui-searchbox { border: 1px solid #c2c7d3; border-radius: .35em; background: #fff; color: #8a91a1; margin-bottom: .25em; }
.ui-side.ops p.clicked { background: #d6e4fd; }
.ui-recipe { min-width: 0; padding: .35em .55em; background: #f6f7f9; border-right: 1px solid #dcdee5; display: flex; flex-direction: column; gap: .45em; }
.ui-op { padding: .4em .6em; border-radius: .4em; background: #dff0d8; border-left: .3em solid #4f9a4f; } .ui-op small { display: block; font-size: .8em; color: #40604a; white-space: nowrap; overflow: hidden; }
.ui-recipe .bake { margin-top: auto; justify-content: center; background: #4f9a4f; border-color: #4f9a4f; padding: .45em; }
.ui-io { min-width: 0; padding: .35em .65em; display: flex; flex-direction: column; gap: .25em; }
.ui-box { flex: 1; padding: .45em .6em; border: 1px solid #c2c7d3; border-radius: .35em; background: #fff; overflow-wrap: anywhere; } .ui-box.out { font-size: 1.12em; font-weight: 700; }

/* file manager */
.ui-grid { display: grid; grid-template-columns: repeat(6, 1fr); align-content: start; gap: .6em; padding: .8em; }
.ui-folder { display: flex; flex-direction: column; align-items: center; gap: .3em; font-size: .88em; }
.ui-folder i { position: relative; width: 3.6em; height: 2.7em; border-radius: .3em; background: linear-gradient(#f7a14c, #e8742a); }
.ui-folder i::before { content: ""; position: absolute; left: 0; top: -.45em; width: 1.6em; height: .55em; border-radius: .3em .3em 0 0; background: #e8742a; }

/* mouse pointer */
.ui-cur { position: absolute; z-index: 9; left: 78%; top: 78%; width: 1.9em; height: 2.6em; pointer-events: none; display: none; transition: left .65s cubic-bezier(.45,.05,.25,1), top .65s cubic-bezier(.45,.05,.25,1); filter: drop-shadow(0 .2em .25em rgba(0,0,0,.35)); }
.ui-cur svg { width: 100%; height: 100%; }
.ui-cur i { position: absolute; left: -1.1em; top: -1.1em; width: 2.6em; height: 2.6em; border-radius: 50%; border: .2em solid #2f7cf6; opacity: 0; }
.ui-cur.press i { animation: ui-ripple .45s ease-out; } .ui-cur.press svg { transform: scale(.9); }
@keyframes ui-ripple { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }

/* playback states (added by learn-tools.js; without it everything is simply visible) */
.is-playing .ui-cur { display: block; }
.is-playing [data-a="show"], .is-playing [data-a="type"] { visibility: hidden; }
.is-playing [data-a="show"].on, .is-playing [data-a="type"].on { visibility: visible; }
.is-playing .ui-chart [data-a="show"] { visibility: visible; transform: scaleY(0); transition: transform .35s ease-out; }
.is-playing .ui-chart [data-a="show"].on { transform: scaleY(1); }
.is-playing .ui-modal[data-a="show"] { transform: translateY(1.2em); opacity: 0; transition: transform .3s ease, opacity .3s ease; }
.is-playing .ui-modal[data-a="show"].on { transform: none; opacity: 1; }
.is-playing .ui-prog[data-a="fill"] i { width: 0; transition: width var(--fill-ms, 1.2s) cubic-bezier(.3,.6,.4,1); }
.is-playing .ui-prog[data-a="fill"].on i { width: 100%; }
.is-playing .ui-pkts .ui-tr.sel:not(.on) { background: #e8e8ff !important; }
@media (prefers-reduced-motion: reduce) { .ui-caret { animation: none; } }

/* tool logo: app-icon tile */
.lt-logo { display: grid; place-items: center; flex-shrink: 0; background: #fff; box-shadow: 0 6px 18px -8px rgba(16,28,61,.4); overflow: hidden; }
.lt-logo img { width: 72%; height: 72%; object-fit: contain; }
.lt-logo svg { width: 64%; height: 64%; }
.lt-tile { background: linear-gradient(150deg, color-mix(in srgb, var(--tile) 82%, #fff) 0%, var(--tile) 55%, color-mix(in srgb, var(--tile) 78%, #000) 100%); color: var(--mark); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 8px 18px -9px rgba(16,28,61,.65); }
.lt-mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; color: #fff; background: var(--c); }

/* hero orbit of logos */
.lt-orbit { position: relative; width: 100%; max-width: 380px; aspect-ratio: 1; margin: 0 auto; }
.lt-orbit .ring { position: absolute; inset: var(--in); border: 1px dashed rgba(255,255,255,.22); border-radius: 50%; animation: lt-spin var(--dur) linear infinite; }
.lt-orbit .ring.rev { animation-direction: reverse; }
.lt-orbit .pin { position: absolute; top: calc(50% + var(--y) * 50% - 23px); left: calc(50% + var(--x) * 50% - 23px); animation: lt-spin var(--dur) linear infinite reverse; }
.lt-orbit .ring.rev .pin { animation-direction: normal; }
.lt-orbit .core { position: absolute; inset: 36%; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: 0 0 60px -6px rgba(229,9,20,.7); }
.lt-orbit .core img { width: 56%; height: auto; }
@keyframes lt-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lt-orbit .ring, .lt-orbit .pin { animation: none; } }

/* "how it works" steps */
.lt-steps li { position: relative; }
.lt-steps li::before { content: ""; position: absolute; left: 21px; top: 46px; bottom: -14px; width: 2px; background: linear-gradient(var(--c), transparent); }
.lt-steps li:last-child::before { display: none; }
.lt-step-n { background: var(--c); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 16%, transparent); }
.lt-card { transition: transform .25s ease, box-shadow .25s ease; }
.lt-card:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -24px rgba(16,28,61,.45); }
