/**
 * Copyright (c) 2014 The xterm.js authors. All rights reserved.
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * https://github.com/chjj/term.js
 * @license MIT
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 *   The original design remains. The terminal itself
 *   has been extended to include xterm CSI codes, among
 *   other features.
 */.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}:root{color-scheme:dark;--bg: #070b12;--bg-elev: #0f1724;--bg-elev-2: #151f2e;--border: #243044;--border-strong: #33435b;--fg: #eef4ff;--fg-dim: #a9b6c9;--fg-mute: #75849a;--accent: #7dd3fc;--accent-strong: #38bdf8;--ok: #5fd17a;--warn: #e2b341;--bad: #e26d6d;--info: #6aa9ff;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:14px;background:var(--bg);color:var(--fg)}html,body,#root{margin:0;min-height:100vh}body{background:radial-gradient(circle at top left,rgba(56,189,248,.16),transparent 34rem),radial-gradient(circle at bottom right,rgba(125,211,252,.08),transparent 28rem),var(--bg)}#root{display:flex;flex-direction:column}*{box-sizing:border-box}h1,h2,h3{margin:0;font-weight:700;letter-spacing:-.02em}h1{font-size:clamp(2.4rem,7vw,4.6rem);line-height:.95}h2{font-size:1.25rem}h3{font-size:.95rem;color:var(--fg-dim);text-transform:uppercase;letter-spacing:.04em}p{margin:0;line-height:1.55}ul,ol{margin:0;padding-left:1.25rem}li{line-height:1.55}code{background:var(--bg-elev-2);border:1px solid var(--border);padding:1px 6px;border-radius:4px;font-size:.9em;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}.muted{color:var(--fg-dim)}.eyebrow{display:inline-block;text-transform:uppercase;letter-spacing:.12em;font-size:.72rem;color:var(--accent);margin-bottom:.35rem}button{font:inherit;cursor:pointer;border-radius:6px;padding:.55rem 1rem;border:1px solid var(--border-strong);background:var(--bg-elev);color:var(--fg);transition:background .12s ease,border-color .12s ease,opacity .12s ease,transform .12s ease}button:hover:not(:disabled){background:var(--bg-elev-2);transform:translateY(-1px)}button:disabled{opacity:.55;cursor:not-allowed}button.primary{background:var(--accent-strong);color:#06241f;border-color:var(--accent-strong);font-weight:600}button.primary:hover:not(:disabled){background:var(--accent);border-color:var(--accent)}button.ghost{background:transparent}button.danger{background:#e26d6d24;color:var(--bad);border-color:#e26d6d73;font-weight:600}button.danger:hover:not(:disabled){background:#e26d6d38;border-color:var(--bad)}button.big{padding:.85rem 1.6rem;font-size:1rem}.login-actions{display:grid;gap:.75rem}.social-button{width:100%;display:flex;align-items:center;justify-content:center;gap:.75rem;padding:.85rem 1rem;border-radius:10px;border-color:#d7dde8;background:#fff;color:#172033;font-weight:700;box-shadow:0 10px 24px #0206172e}.social-button:hover:not(:disabled){background:#f8fafc;border-color:#fff}.social-button img{width:20px;height:20px;object-fit:contain}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;display:grid;place-items:center;padding:1.5rem;background:#03060ab8;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.confirm-modal{width:min(420px,100%);border:1px solid var(--border-strong);border-radius:10px;background:var(--bg-elev);box-shadow:0 18px 60px #00000073;padding:1.4rem;display:flex;flex-direction:column;gap:1rem}.modal-actions{display:flex;justify-content:flex-end;gap:.6rem;flex-wrap:wrap}main.landing{width:min(1180px,calc(100% - 2rem));min-height:min(780px,calc(100vh - 2rem));margin:1rem auto;padding:clamp(1.25rem,3vw,2.25rem);border:1px solid rgba(125,211,252,.14);border-radius:28px;background:linear-gradient(90deg,#070b12fa,#0a1320ed),radial-gradient(circle at 76% 28%,rgba(56,189,248,.18),transparent 25rem);box-shadow:0 26px 90px #0000007a;display:flex;flex-direction:column;gap:clamp(2rem,4vw,3rem)}.top-nav{display:flex;align-items:center;justify-content:space-between;gap:1.5rem}.brand-mark{display:inline-flex;align-items:center;gap:.55rem;color:#f8fbff;font-size:1.35rem;font-weight:800;letter-spacing:-.04em}.brand-icon{width:26px;height:26px;border:1px solid rgba(125,211,252,.7);border-radius:8px;background:linear-gradient(135deg,#38bdf82e,#22c55e1f),var(--bg-elev-2);box-shadow:inset 0 0 0 5px #7dd3fc14}.nav-links{display:flex;align-items:center;gap:clamp(1rem,3vw,2rem)}.top-nav a,.nav-link-muted{color:var(--fg-dim);text-decoration:none;font-weight:600}.top-nav a:hover{color:var(--fg)}.hero-grid{display:grid;grid-template-columns:minmax(0,.92fr) minmax(420px,1.08fr);align-items:center;gap:clamp(2rem,5vw,5rem);flex:1}.hero-copy{display:flex;flex-direction:column;gap:1.35rem}.landing-hero{display:flex;flex-direction:column;gap:.8rem}.landing-hero h1{color:#fff}.hero-copy h1{color:#fff;max-width:11ch;text-wrap:balance;text-shadow:0 3px 18px rgba(0,0,0,.35)}.landing-hero .tag{color:var(--fg-dim);font-size:1.05rem;max-width:62ch}.hero-copy .tag{color:#c5d1e3;font-size:1.02rem;max-width:58ch}.auth-card{display:flex;flex-direction:column;gap:.85rem;width:min(430px,100%);margin-top:1.2rem}.section-label{color:#cbd7e8;font-size:.82rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase}.status-card{border:1px solid var(--border);border-radius:16px;padding:1.15rem 1.25rem;background:#151f2eb8}.readiness-card{align-self:center;width:min(430px,100%);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.user-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding-bottom:.75rem;margin-bottom:.75rem;border-bottom:1px solid var(--border)}.status-card h2{font-size:.95rem;color:var(--fg);margin-bottom:.6rem}ul.status-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.4rem}ul.status-list li{display:flex;align-items:center;gap:.5rem}.dot{display:inline-block;width:9px;height:9px;border-radius:50%;flex-shrink:0}.dot.ok{background:var(--ok);box-shadow:0 0 6px var(--ok)}.dot.warn{background:var(--warn);box-shadow:0 0 6px var(--warn)}.dot.bad{background:var(--bad);box-shadow:0 0 6px var(--bad)}.error-banner{border:1px solid var(--bad);background:#e26d6d14;color:var(--bad);padding:.6rem .9rem;border-radius:6px}.hint.warn{color:var(--warn)}.footnote{color:var(--fg-mute);font-size:.86rem}.hero-visual{position:relative;min-height:480px;display:grid;place-items:center;overflow:hidden}.cube-field{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.95}.cube{position:absolute;width:74px;height:74px;border:1px solid rgba(191,219,254,.45);border-radius:14px;background:linear-gradient(145deg,#94a3b838,#0f172a2e),#0f172a66;box-shadow:0 20px 45px #00000047,inset 0 0 24px #7dd3fc1f;transform:rotate(45deg) skew(-8deg,-8deg)}.cube:after{content:"";position:absolute;top:18px;right:18px;bottom:18px;left:18px;border-radius:8px;background:linear-gradient(135deg,#5cff87,#38bdf8);box-shadow:0 0 24px #5cff8780}.cube-1{left:10%;top:34%}.cube-2{left:28%;top:18%;width:86px;height:86px}.cube-3{left:45%;top:34%}.cube-4{left:63%;top:20%;width:82px;height:82px}.cube-5{right:6%;top:38%}.cube-6{left:28%;bottom:28%}.cube-7{left:57%;bottom:24%}.cube-8{right:18%;bottom:18%}.cube-4:after,.cube-6:after{background:linear-gradient(135deg,#60a5fa,#22d3ee)}.cube-5:after,.cube-8:after{opacity:.2}.preview-card{position:relative;z-index:2;width:min(440px,92%);margin-top:220px;border:1px solid rgba(203,213,225,.25);border-radius:14px;background:#0f172ab8;box-shadow:0 24px 60px #00000073;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);overflow:hidden}.preview-head{display:flex;align-items:center;justify-content:space-between;padding:.75rem .9rem;border-bottom:1px solid rgba(203,213,225,.14)}.preview-head span{color:#93f6b5;font-size:.72rem}.preview-body{display:grid;grid-template-columns:1fr 1.1fr;gap:.65rem;padding:.75rem}.domain-card{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--border)}.domain-bars{display:flex;flex-direction:column;gap:.55rem}.domain-bars.compact{margin-top:.75rem}.domain-label{display:flex;align-items:center;justify-content:space-between;gap:.75rem;font-size:.72rem;color:#dce7f7}.domain-label strong{color:#fff}.domain-track{height:6px;overflow:hidden;border-radius:999px;background:#94a3b847}.domain-track span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#60a5fa,#38bdf8,#5cff87)}.terminal-preview{border:1px solid rgba(203,213,225,.16);border-radius:10px;background:#030712;padding:.55rem}.terminal-dots{display:flex;gap:.28rem;margin-bottom:.45rem}.terminal-dots span{width:7px;height:7px;border-radius:50%;background:#f87171}.terminal-dots span:nth-child(2){background:#fbbf24}.terminal-dots span:nth-child(3){background:#34d399}.terminal-preview pre{margin:0;white-space:pre-wrap;color:#d1fae5;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.62rem;line-height:1.55}.landing-footer{display:flex;gap:1.4rem;padding-top:1rem;border-top:1px solid rgba(203,213,225,.12);color:var(--fg-mute);font-size:.78rem}.landing-footer a{color:var(--fg-mute);text-decoration:none}@media (max-width: 920px){.nav-links,.nav-link-muted{display:none}.hero-grid{grid-template-columns:1fr}.hero-copy h1{max-width:12ch}.hero-visual{min-height:420px}}@media (max-width: 640px){main.landing{width:min(100% - 1rem,1180px);margin:.5rem auto;border-radius:20px}.preview-body{grid-template-columns:1fr}}.workspace{display:flex;flex-direction:column;min-height:100vh;padding:1rem 1.25rem 1.25rem;gap:.9rem}.banner{border-radius:6px;padding:.55rem .9rem;border:1px solid var(--border)}.banner.gentle{background:#6aa9ff14;border-color:var(--info);color:var(--info)}.banner.urgent{background:#e2b3411a;border-color:var(--warn);color:var(--warn)}.workspace-grid{display:grid;grid-template-columns:minmax(320px,1fr) 1.6fr;gap:1rem;flex:1;min-height:0}@media (max-width: 980px){.workspace-grid{grid-template-columns:1fr}}.task-panel,.terminal-panel{border:1px solid var(--border);border-radius:8px;background:var(--bg-elev);display:flex;flex-direction:column;min-height:0}.task-panel{padding:1rem 1.1rem;gap:1rem;overflow-y:auto}.task-panel header{margin-bottom:.25rem}.task-panel .objective{color:var(--fg-dim)}.starter ul{list-style:none;padding:0;display:flex;flex-direction:column;gap:.35rem}.hints{display:flex;flex-direction:column;gap:.5rem}.hint-list{display:flex;flex-direction:column;gap:.4rem;color:var(--fg)}.hint-list:empty{display:none}.hints button{align-self:flex-start}.terminal-panel{padding:.6rem .7rem;gap:.5rem}.terminal-panel header{display:flex;align-items:center;justify-content:space-between;padding:0 .2rem}.terminal-panel header .eyebrow{margin:0}.ns-pill{font-size:.78rem;padding:2px 8px;border-radius:999px;background:var(--bg-elev-2);border:1px solid var(--border);color:var(--fg-dim)}.terminal-wrap{position:relative;flex:1;min-height:320px;border:1px solid var(--border);border-radius:6px;background:#0b0f14;overflow:hidden;padding:6px}.terminal-host{width:100%;height:100%}.terminal-hint{font-size:.82rem;padding:0 .2rem}.terminal-toast{position:absolute;top:10px;right:14px;padding:6px 10px;background:#141c26eb;color:#d6deeb;font-size:.78rem;border:1px solid var(--border);border-radius:4px;pointer-events:none;animation:terminal-toast-fade 1.4s ease forwards;z-index:5}.terminal-connecting{position:absolute;top:10px;left:14px;padding:4px 8px;background:#141c26e6;color:var(--muted);font-size:.78rem;border:1px solid var(--border);border-radius:4px;pointer-events:none;z-index:4}@keyframes terminal-toast-fade{0%{opacity:0;transform:translateY(-4px)}15%{opacity:1;transform:translateY(0)}80%{opacity:1}to{opacity:0}}.action-bar{display:flex;align-items:center;justify-content:space-between;padding:.6rem .85rem;border:1px solid var(--border);border-radius:8px;background:var(--bg-elev)}.timer strong{color:var(--accent)}.actions{display:flex;gap:.6rem}main.result,main.explain,main.expired{max-width:760px;margin:6vh auto;padding:2rem;border:1px solid var(--border);border-radius:10px;background:var(--bg-elev);display:flex;flex-direction:column;gap:1.25rem}.result-head h2 code{background:var(--bg-elev-2)}.score-row{display:flex;align-items:center;gap:1rem}.score{display:inline-flex;align-items:baseline;gap:.25rem;border:1px solid var(--border);background:var(--bg-elev-2);padding:.6rem 1rem;border-radius:8px}.score strong{font-size:2rem}.score span{color:var(--fg-mute)}.score.perfect strong{color:var(--ok)}.score.good strong{color:var(--accent)}.score.warn strong{color:var(--warn)}.score.bad strong{color:var(--bad)}ul.check-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.55rem}ul.check-list li{display:grid;grid-template-columns:22px 1fr;align-items:start;gap:.6rem;padding:.6rem .75rem;border:1px solid var(--border);border-radius:6px;background:var(--bg-elev-2)}ul.check-list .mark{font-weight:700;font-size:1.1rem;text-align:center;margin-top:1px}ul.check-list li.ok .mark{color:var(--ok)}ul.check-list li.fail .mark{color:var(--bad)}ul.check-list .name{font-weight:600}ul.check-list .hint{color:var(--warn);margin-top:2px}ul.check-list .actual{font-size:.85rem;margin-top:2px}.result-actions,.explain-actions{display:flex;gap:.6rem;justify-content:flex-end;flex-wrap:wrap}.explain-head{display:flex;flex-direction:column;gap:.35rem}.explain-meta{display:flex;gap:.5rem;align-items:center}.score-pill{background:var(--bg-elev-2);border:1px solid var(--border);border-radius:999px;padding:2px 12px;color:var(--accent);font-weight:600}.source-pill{font-size:.82rem;padding:2px 10px;border-radius:999px;background:var(--bg-elev-2);border:1px solid var(--border)}article.prose p{margin-bottom:.85rem;color:var(--fg)}article.prose p:last-child{margin-bottom:0}main.expired{text-align:left}main.expired button{align-self:flex-start}
