:root {
    --bg: #06080c;
    --panel: #0d1117;
    --input: #080b10;
    --line: #252b36;
    --text: #f8f8f2;
    --muted: #7d8796;
    --green: #50fa7b;
    --purple: #bd93f9;
    --pink: #ff79c6;
    --cyan: #8be9fd;
    --yellow: #f1fa8c;
    --red: #ff5555;
    --mono: "JetBrains Mono", monospace;
    --sans: "Inter", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; }
body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
        var(--bg);
    background-size: 32px 32px;
    color: var(--text);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
a { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.glow { position: fixed; z-index: -1; width: 30rem; height: 30rem; border-radius: 50%; filter: blur(140px); opacity: .07; pointer-events: none; }
.glow--one { top: -14rem; left: -10rem; background: var(--purple); }
.glow--two { right: -15rem; bottom: -12rem; background: var(--pink); }
.site-header, .site-footer, main { width: min(790px, calc(100% - 32px)); margin-inline: auto; }

.site-header { display: flex; height: 62px; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.06); }
.brand { display: flex; align-items: center; gap: 10px; font: 700 14px var(--mono); text-decoration: none; }
.brand__prompt { color: var(--purple); font-size: 18px; }
.status-pill { display: flex; align-items: center; gap: 8px; color: var(--muted); font: 500 10px var(--mono); }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 10px var(--yellow); }
.status-pill.is-ready i { background: var(--green); box-shadow: 0 0 10px var(--green); }
.status-pill.is-missing i { background: var(--red); box-shadow: 0 0 10px var(--red); }

.unsupported-browser { width: min(680px, 100%); margin: 48px auto 80px; }
.unsupported-card { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: 0 22px 65px rgba(0,0,0,.4); }
.unsupported-card__body { display: grid; grid-template-columns: 190px 1fr; align-items: center; gap: 30px; padding: 32px; }
.unsupported-copy h1 { margin: 0 0 13px; font: 700 25px var(--mono); letter-spacing: -.04em; }
.unsupported-copy > p:not(.gate-error) { margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.unsupported-copy small { display: block; margin-top: 13px; color: #5f6978; font: 500 8px var(--mono); }
.cry-monitor { position: relative; padding: 7px 7px 25px; border: 2px solid #343b48; border-radius: 10px 10px 6px 6px; background: #181d26; box-shadow: inset 0 0 0 2px #07090d, 0 18px 35px rgba(0,0,0,.45); animation: sad-monitor 3.5s ease-in-out infinite; }
.cry-monitor::before { position: absolute; right: 25px; bottom: 8px; left: 25px; height: 3px; border-radius: 50%; background: #07090d; content: ""; }
.cry-monitor__screen { position: relative; height: 145px; overflow: hidden; border-radius: 4px; background: #030405; }
.cry-monitor__screen img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.25) saturate(.65) contrast(1.1) brightness(.72); animation: sad-flicker 4s linear infinite; }
.cry-monitor > code { position: absolute; right: 0; bottom: 9px; left: 0; color: var(--red); font: 600 7px var(--mono); text-align: center; }
.tear { position: absolute; z-index: 2; top: 25%; width: 7px; height: 12px; border-radius: 50% 50% 55% 55%; background: var(--cyan); box-shadow: 0 0 10px rgba(139,233,253,.7); opacity: 0; }
.tear::before { position: absolute; top: -3px; left: 1px; width: 5px; height: 5px; background: inherit; content: ""; transform: rotate(45deg); }
.tear--left { left: 36%; animation: cry 1.8s ease-in infinite; }
.tear--right { left: 54%; animation: cry 1.8s .65s ease-in infinite; }

.extension-gate { width: min(680px, 100%); margin: 48px auto 80px; }
.gate-terminal, .install-guide { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: 0 22px 65px rgba(0,0,0,.4); }
.gate-terminal__body { padding: 34px; }
.gate-error { margin: 0 0 12px; color: var(--red); font: 500 10px var(--mono); }
.gate-error b { margin-right: 7px; }
.gate-terminal h1 { margin: 0 0 13px; color: var(--text); font: 700 25px var(--mono); letter-spacing: -.04em; }
.gate-terminal__body > p:not(.gate-error) { max-width: 530px; margin: 0 0 24px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.gate-terminal small { display: block; margin-top: 13px; color: #5f6978; font: 500 8px var(--mono); }
.primary-button, .secondary-button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 12px; padding: 0 17px; border-radius: 5px; cursor: pointer; font: 700 10px var(--mono); text-decoration: none; }
.primary-button { border: 0; background: var(--text); color: var(--bg); }
.primary-button:hover { box-shadow: 0 9px 25px rgba(248,248,242,.1); transform: translateY(-1px); }
.primary-button span { color: var(--purple); font-size: 15px; }
.secondary-button { border: 1px solid var(--line); background: var(--input); color: #c8d0da; }
.secondary-button:hover { border-color: var(--purple); }

.install-guide { margin-top: 22px; padding: 28px; }
.guide-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.guide-kicker { color: var(--purple); font: 500 9px var(--mono); }
.guide-header h2 { margin: 6px 0 0; font: 700 19px var(--mono); }
.language-toggle { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 5px; background: var(--input); }
.language-toggle button { width: 35px; height: 28px; border: 0; border-radius: 3px; background: transparent; color: var(--muted); cursor: pointer; font: 600 9px var(--mono); }
.language-toggle button.is-active { background: var(--purple); color: var(--bg); }
.install-steps { display: grid; gap: 0; margin: 0; padding: 0; counter-reset: steps; list-style: none; }
.install-steps li { position: relative; min-height: 58px; padding: 12px 10px 12px 48px; border-top: 1px solid var(--line); counter-increment: steps; }
.install-steps li::before { position: absolute; top: 14px; left: 10px; color: var(--purple); content: "0" counter(steps); font: 600 9px var(--mono); }
.install-steps b { display: block; margin-bottom: 5px; color: var(--text); font: 600 11px var(--mono); }
.install-steps span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.install-steps code { padding: 2px 5px; border-radius: 3px; background: var(--input); color: var(--cyan); font: 500 9px var(--mono); }
.install-steps em { color: var(--yellow); font-style: normal; }
.guide-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.guide-status { min-height: 18px; margin: 11px 0 0; color: var(--yellow); font: 500 9px var(--mono); }

.hero { margin: 30px auto 48px; text-align: center; }
.eyebrow { color: var(--muted); font: 600 11px var(--mono); }
.eyebrow span { color: var(--purple); }
.hero__intro { margin: 12px 0 0; color: var(--text); font: 500 11px var(--mono); }
.hero__intro span { color: var(--purple); }

.monitor { width: 190px; margin: 14px auto 0; animation: monitor-float 5s ease-in-out infinite; filter: drop-shadow(0 15px 24px rgba(0,0,0,.5)); }
.monitor__window { overflow: hidden; padding: 6px; border: 2px solid #343b48; border-radius: 10px; background: #181d26; box-shadow: inset 0 0 0 2px #07090d; }
.monitor__bar { display: flex; height: 20px; align-items: center; gap: 4px; padding: 0 6px; border-radius: 4px 4px 0 0; background: #07090d; }
.monitor__bar span { width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.monitor__bar span:nth-child(2) { background: var(--yellow); }
.monitor__bar span:nth-child(3) { background: var(--green); }
.monitor__bar code { margin-left: auto; color: #596271; font: 500 6px var(--mono); }
.monitor__screen { position: relative; height: 130px; overflow: hidden; border-radius: 0 0 4px 4px; background: #030405; }
.monitor__screen img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8) contrast(1.15) brightness(.85); animation: screen-flicker 7s linear infinite; }
.monitor__screen code { position: absolute; z-index: 2; right: 8px; bottom: 7px; padding: 4px 6px; border: 1px solid rgba(68,71,90,.8); border-radius: 3px; background: rgba(25,26,33,.82); color: #babccc; font: 500 7px var(--mono); }
.monitor__screen code b { color: var(--green); text-shadow: 0 0 6px var(--green); }
.monitor__scanlines { position: absolute; z-index: 1; inset: 0; background: repeating-linear-gradient(to bottom, transparent 0, transparent 3px, rgba(0,0,0,.18) 4px); pointer-events: none; animation: scan 8s linear infinite; }
.monitor__neck { width: 38px; height: 13px; margin: 0 auto; background: linear-gradient(90deg, #181d26, #414957, #181d26); }
.monitor__base { width: 82px; height: 7px; margin: 0 auto; border: 1px solid #414957; border-radius: 7px 7px 2px 2px; background: #181d26; }

.download-card { margin-top: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: 0 20px 60px rgba(0,0,0,.45); text-align: left; }
.editor-bar { display: grid; grid-template-columns: 1fr auto 1fr; height: 35px; align-items: center; padding: 0 11px; border-bottom: 1px solid var(--line); background: #090c11; font: 500 8px var(--mono); }
.editor-dots { display: flex; gap: 7px; }
.editor-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.editor-dots span:nth-child(2) { background: var(--yellow); }
.editor-dots span:nth-child(3) { background: var(--green); }
.editor-tab { display: flex; height: 35px; align-items: center; gap: 7px; padding: 0 14px; border-right: 1px solid var(--line); border-left: 1px solid var(--line); color: #c5c6d6; background: var(--panel); }
.editor-tab span { color: var(--cyan); font-size: 15px; }
.editor-tab i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.editor-actions { justify-self: end; color: #686b80; }
.code-line { display: flex; gap: 16px; padding: 14px 17px 0; color: #737d8d; font: 500 9px var(--mono); }
.code-line b { color: #606377; font-weight: 500; }
.code-line code span { color: var(--pink); }
.download-card form { padding: 14px 17px 16px 45px; }
label { display: block; margin-bottom: 9px; color: #d7d7df; font: 500 11px var(--mono); }
.input-shell { display: flex; height: 49px; align-items: center; border: 1px solid var(--line); border-radius: 5px; background: var(--input); transition: border-color .2s, box-shadow .2s; }
.input-shell:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(189,147,249,.1); }
.input-shell.is-invalid { border-color: var(--red); }
.input-shell__icon { display: grid; flex: 0 0 45px; place-items: center; color: var(--cyan); }
.input-shell__icon svg { width: 19px; }
.input-shell input { width: 0; min-width: 0; flex: 1 1 0; border: 0; outline: 0; background: transparent; color: var(--text); font: 500 12px var(--mono); }
.input-shell input::placeholder { color: #686b80; }
.paste-button { flex: 0 0 auto; margin-right: 8px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 4px; background: #343746; color: var(--text); cursor: pointer; font: 500 10px var(--mono); }
.paste-button:hover { border-color: var(--purple); }
.field-meta { display: flex; min-height: 30px; justify-content: space-between; padding-top: 8px; color: #797c91; font: 500 9px var(--mono); }
.field-error { display: block; min-height: 19px; padding-top: 5px; color: var(--red); font: 500 9px var(--mono); }
.field-meta .field-error { padding: 0; }
.download-button { display: flex; width: 100%; height: 44px; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 5px; background: var(--text); color: var(--bg); cursor: pointer; font: 700 11px var(--mono); transition: transform .15s, box-shadow .15s, opacity .15s; }
.download-button:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(248,248,242,.12); }
.download-button:disabled { cursor: wait; opacity: .75; }
.download-button svg { width: 17px; }
.button-loading { display: none; align-items: center; gap: 9px; }
.button-loading i { width: 15px; height: 15px; border: 2px solid rgba(25,26,33,.25); border-top-color: var(--bg); border-radius: 50%; animation: spin .7s linear infinite; }
.is-loading .button-label, .is-loading .download-button > svg { display: none; }
.is-loading .button-loading { display: inline-flex; }
.processing-note { display: none; margin: 11px 0 0; color: var(--muted); font: 500 9px var(--mono); text-align: center; }
.is-loading .processing-note { display: block; }
.trust-row { display: flex; justify-content: center; gap: 25px; margin-top: 19px; color: var(--muted); font: 500 10px var(--mono); }
.trust-row span { display: flex; gap: 6px; }
.trust-row b { color: var(--green); }

.run-console { border-top: 1px solid var(--line); background: #06080c; font: 500 9px var(--mono); }
.run-console__bar { display: flex; height: 31px; align-items: center; gap: 18px; padding: 0 15px; border-bottom: 1px solid var(--line); color: #777a8e; font-size: 8px; letter-spacing: .07em; }
.run-console__bar span:first-child { color: var(--text); }
.run-console__output { min-height: 54px; max-height: 100px; overflow-y: auto; padding: 10px 14px; color: #aeb7c5; }
.run-console__output p { margin: 0 0 6px; opacity: 1; transform: none; transition: opacity .2s, transform .2s; }
.run-console__output p:not(:first-child) { opacity: 0; transform: translateY(4px); }
.run-console__output p.is-visible { opacity: 1; transform: translateY(0); }
.run-console__output b { display: inline-block; min-width: 19px; color: var(--purple); }
.run-console__output .log-success, .run-console__output .log-success b { color: var(--green); }
.run-console__output .log-error, .run-console__output .log-error b { color: var(--red); }
.cursor { display: inline-block; width: 6px; height: 11px; margin-left: 5px; vertical-align: -2px; background: var(--purple); animation: blink 1s steps(1) infinite; }
.run-console[data-state="running"] { box-shadow: inset 3px 0 0 var(--cyan); }
.run-console[data-state="success"] { box-shadow: inset 3px 0 0 var(--green); }
.run-console[data-state="error"] { box-shadow: inset 3px 0 0 var(--red); }

.terminal { margin: 0 auto 55px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: 0 18px 50px rgba(0,0,0,.3); }
.terminal__bar { display: flex; height: 32px; align-items: center; gap: 6px; padding: 0 11px; border-bottom: 1px solid var(--line); background: #090c11; }
.terminal__bar span { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.terminal__bar span:nth-child(2) { background: var(--yellow); }
.terminal__bar span:nth-child(3) { background: var(--green); }
.terminal__bar code { margin-left: 7px; color: #777a8e; font: 500 9px var(--mono); }
.terminal__body { padding: 16px; text-align: left; }
.terminal__body p { margin: 0; color: var(--text); font: 500 12px/1.8 var(--mono); }
.terminal__body p span { color: var(--purple); }
.site-footer { display: flex; justify-content: space-between; padding: 18px 0 24px; border-top: 1px solid rgba(255,255,255,.06); color: #646e7d; font: 500 8px var(--mono); }
.site-footer p { margin: 0; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes monitor-float { 0%, 100% { transform: translateY(0) rotate(-.3deg); } 50% { transform: translateY(-5px) rotate(.3deg); } }
@keyframes screen-flicker { 0%, 96%, 100% { opacity: 1; } 97% { opacity: .88; } 98% { opacity: .98; } }
@keyframes scan { from { background-position-y: 0; } to { background-position-y: 40px; } }
@keyframes cry { 0% { opacity: 0; transform: translateY(-3px) scale(.7); } 18% { opacity: .95; } 75% { opacity: .8; } 100% { opacity: 0; transform: translateY(58px) scale(1); } }
@keyframes sad-monitor { 0%, 100% { transform: translateY(0) rotate(-.7deg); } 50% { transform: translateY(3px) rotate(.7deg); } }
@keyframes sad-flicker { 0%, 91%, 100% { opacity: 1; } 92% { opacity: .65; } 94% { opacity: .9; } }

/* Match the app's former appearance at 125% browser zoom on desktop. */
@media (min-width: 621px) {
    body { zoom: 1.25; }
}

@media (max-width: 620px) {
    body { zoom: .8; }
    .site-header, .site-footer, main { width: min(790px, calc(100% - 32px)); }
    .unsupported-card__body { grid-template-columns: 150px 1fr; gap: 20px; padding: 24px; }
    .cry-monitor__screen { height: 115px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
