@font-face {
    font-family: "Proggy";
    src: url("../fonts/ProggyClean.ttf") format("truetype");
    font-display: swap;
}

@property --bg      { syntax: "<color>"; inherits: true; initial-value: #101014; }
@property --frame   { syntax: "<color>"; inherits: true; initial-value: #0b0b0e; }
@property --section { syntax: "<color>"; inherits: true; initial-value: #141419; }
@property --inline  { syntax: "<color>"; inherits: true; initial-value: #1c1c23; }
@property --element { syntax: "<color>"; inherits: true; initial-value: #1d1d25; }
@property --hover   { syntax: "<color>"; inherits: true; initial-value: #272731; }
@property --border  { syntax: "<color>"; inherits: true; initial-value: #26262f; }
@property --text    { syntax: "<color>"; inherits: true; initial-value: #dedee6; }
@property --dim     { syntax: "<color>"; inherits: true; initial-value: #6c6c7a; }
@property --accent  { syntax: "<color>"; inherits: true; initial-value: #9185d1; }
@property --accent2 { syntax: "<color>"; inherits: true; initial-value: #6d62b0; }

:root {
    --bg: #101014; --frame: #0b0b0e; --section: #141419; --inline: #1c1c23; --element: #1d1d25;
    --hover: #272731; --border: #26262f; --outline: #000; --text: #dedee6; --dim: #6c6c7a;
    --accent: #9185d1; --accent2: #6d62b0;

    --ok: #73d159; --warn: #f2b840; --bad: #e64047;

    --ui: "Proggy", "Consolas", ui-monospace, monospace;
    --fs: 16px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --gutter: 16px;
    --max: 1180px;

    transition: --bg .45s, --frame .45s, --section .45s, --inline .45s, --element .45s, --hover .45s,
                --border .45s, --text .45s, --dim .45s, --accent .45s, --accent2 .45s;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--frame); scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--frame);
    color: var(--text);
    font: var(--fs)/1.45 var(--ui);
    -webkit-font-smoothing: none;
    text-rendering: optimizeSpeed;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
img { display: block; max-width: 100%; }

.ol { text-shadow: 1px 0 0 #000, -1px 0 0 #000, 0 1px 0 #000, 0 -1px 0 #000, 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; }
.dim { color: var(--dim); }
.acc { color: var(--accent); }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.hidden { display: none !important; }

* { scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--accent); }
::-webkit-scrollbar-track { background: transparent; }

.logo { position: relative; display: inline-block; width: calc(var(--logo, 20px) * 77 / 64); height: var(--logo, 20px); flex: none; }
.logo i { position: absolute; inset: 0; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.logo .c { --m: url("../img/logo-c.png"); background: var(--accent); }
.logo .f { --m: url("../img/logo-f.png"); background: var(--text); }
.brand { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand b { font-weight: normal; }

.ico { display: inline-block; width: 16px; height: 16px; flex: none; background: currentColor;
       -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ico-target   { --m: url("../img/icon-target.png"); }
.ico-eye      { --m: url("../img/icon-eye.png"); }
.ico-run      { --m: url("../img/icon-run.png"); }
.ico-tiles    { --m: url("../img/icon-other.png"); }
.ico-settings { --m: url("../img/icon-settings.png"); }
svg.ico { background: none; -webkit-mask: none; mask: none; fill: currentColor; }

.win {
    position: relative;
    background: var(--bg);
    border: 1px solid var(--border);
    box-shadow: 0 0 0 1px var(--outline), 0 24px 60px -12px rgba(0, 0, 0, .7);
}
.win::before, .accent-top::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 2;
    background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 70%, #000));
}
.accent-top { position: relative; }

.gbox {
    position: relative;
    background: var(--section);
    border: 1px solid var(--border);
    transition: border-color .2s;
}
.gbox:hover { border-color: color-mix(in srgb, var(--border) 55%, var(--accent)); }
.gbox > h3, .gbox-title {
    display: flex; align-items: center; gap: 8px;
    margin: 0; padding: 4px 10px;
    font-size: var(--fs); font-weight: normal;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--frame) 40%, var(--section));
}
.gbox > h3::before, .gbox-title::before { content: ""; width: 2px; height: 9px; background: var(--accent); }
.gbox > h3 .right, .gbox-title .right { margin-left: auto; color: var(--dim); }
.gbox-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; }

.chk { display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; color: var(--dim); transition: color .15s; min-height: 20px; }
.chk input { position: absolute; opacity: 0; pointer-events: none; }
.chk .box { width: 10px; height: 10px; background: var(--element); outline: 1px solid var(--border); transition: background .15s; flex: none; }
.chk:hover { color: color-mix(in srgb, var(--dim) 55%, var(--text)); }
.chk:has(input:checked) { color: var(--text); }
.chk input:checked + .box { background: var(--accent); outline-color: color-mix(in srgb, var(--accent) 60%, #000); }
.chk input:focus-visible + .box { outline: 1px solid var(--accent); outline-offset: 2px; }
.chk .right { margin-left: auto; color: var(--dim); }

.slider { display: flex; flex-direction: column; gap: 3px; }
.slider .row { display: flex; justify-content: space-between; }
.slider .row output { color: var(--dim); }
.slider input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; margin: 0; cursor: pointer;
    background: linear-gradient(var(--accent), var(--accent)) 0 / var(--p, 50%) 100% no-repeat, var(--element); outline: 1px solid var(--border); }
.slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 4px; height: 10px; background: var(--text); border: 0; opacity: 0; transition: opacity .15s; }
.slider input[type=range]:hover::-webkit-slider-thumb { opacity: 1; }
.slider input[type=range]::-moz-range-thumb { width: 4px; height: 10px; background: var(--text); border: 0; border-radius: 0; opacity: 0; }
.slider input[type=range]:hover::-moz-range-thumb { opacity: 1; }

.field { display: flex; flex-direction: column; gap: 3px; }
.field > span { display: flex; justify-content: space-between; }
.field > span small { color: var(--dim); font-size: inherit; }
.input, .select {
    width: 100%; height: 26px; padding: 0 8px;
    background: var(--element); border: 1px solid var(--border); outline: 0; border-radius: 0;
    transition: border-color .15s, background .15s;
}
.input::placeholder { color: var(--dim); }
.input:hover, .select:hover { background: var(--hover); }
.input:focus { border-color: var(--accent); }
.input.err { border-color: var(--bad); }
.input[readonly] { color: var(--dim); }
.select { -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 22px;
    background: var(--element) no-repeat right 8px center / 7px 4px
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 4'%3E%3Cpath d='M0 0h7L3.5 4z' fill='%236c6c7a'/%3E%3C/svg%3E"); }
.select option { background: var(--frame); }
.input-group { display: flex; gap: 6px; }
.input-group .input { flex: 1; min-width: 0; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 26px; padding: 0 14px; cursor: pointer; white-space: nowrap; user-select: none;
    background: var(--element); border: 1px solid var(--border); color: var(--text);
    transition: background .15s, border-color .15s, filter .15s, color .15s;
}
.btn:hover { background: var(--hover); }
.btn:active { filter: brightness(.85); }
.btn:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.btn.full { width: 100%; }
.btn.lg { height: 34px; padding: 0 20px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.btn-accent {
    background: linear-gradient(var(--accent), var(--accent2));
    border-color: color-mix(in srgb, var(--accent) 75%, #fff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 0 0 1px var(--outline);
    color: #fff;
}
.btn-accent:hover { background: linear-gradient(color-mix(in srgb, var(--accent) 82%, #fff), color-mix(in srgb, var(--accent2) 82%, #fff)); }
.btn-danger:hover { border-color: var(--bad); color: var(--bad); }
.btn-row { display: flex; gap: 6px; }
.btn-row > .btn { flex: 1; }

.tag { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px; white-space: nowrap;
       color: var(--c, var(--dim)); border: 1px solid color-mix(in srgb, var(--c, var(--dim)) 60%, transparent);
       background: color-mix(in srgb, var(--c, var(--dim)) 12%, transparent); }
.tag::before, .dot::before { content: ""; width: 4px; height: 4px; background: var(--c, var(--dim)); flex: none; }
.dot { display: inline-flex; align-items: center; gap: 6px; color: var(--c, var(--dim)); }
.c-ok { --c: var(--ok); } .c-warn { --c: var(--warn); } .c-bad { --c: var(--bad); } .c-acc { --c: var(--accent); }
.blink::before { animation: blink 2s steps(1) infinite; }
@keyframes blink { 80% { opacity: .4; } }

.tile { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none;
        background: linear-gradient(color-mix(in srgb, var(--inline) 80%, #fff 6%), var(--inline));
        border: 1px solid var(--border); box-shadow: 0 0 0 1px var(--outline); color: var(--dim); }
.tile.on { border-color: var(--accent); color: var(--accent); }
.tile img { display: block; width: 24px; height: 24px; object-fit: contain; image-rendering: auto; }
.tile:has(img) { overflow: hidden; }

.sep { height: 1px; background: var(--border); margin: 4px 0; border: 0; }

.spinner { width: 12px; height: 12px; border: 2px solid var(--inline); border-top-color: var(--accent); border-right-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.progress { height: 4px; background: var(--element); outline: 1px solid var(--border); overflow: hidden; }
.progress > i { display: block; height: 100%; width: var(--p, 0%); background: var(--accent); transition: width .4s var(--ease);
                box-shadow: inset -14px 0 10px -8px rgba(255, 255, 255, .35); }

kbd { display: inline-block; padding: 0 5px; border: 1px solid var(--border); background: var(--element); color: var(--accent); font: inherit; }

.subtabs { position: relative; display: inline-flex; background: var(--frame); outline: 1px solid var(--border); height: 26px; }
.subtabs button { position: relative; z-index: 1; padding: 0 14px; background: none; border: 0; cursor: pointer; color: var(--dim); transition: color .2s; }
.subtabs button:hover { color: color-mix(in srgb, var(--dim) 45%, var(--text)); }
.subtabs button.on { color: var(--text); }
.subtabs button + button::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px; background: var(--border); }
.subtabs button.on::before, .subtabs button.on + button::before { opacity: 0; }
.subtabs .hl { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: var(--section);
               background-image: linear-gradient(transparent, color-mix(in srgb, var(--accent) 16%, transparent));
               border-bottom: 2px solid var(--accent); transition: transform .3s var(--ease), width .3s var(--ease); }

.tablist { position: relative; display: flex; flex-direction: column; }
.tablist .tab { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 20px;
                background: none; border: 0; cursor: pointer; color: var(--dim); text-align: left; transition: color .2s, padding .2s; }
.tablist .tab:hover { color: color-mix(in srgb, var(--dim) 45%, var(--text)); padding-left: 22px; }
.tablist .tab.on { color: var(--text); padding-left: 22px; }
.tablist .tab .ico { transition: color .2s; }
.tablist .tab.on .ico { color: var(--accent); }
.tablist .tab .count { margin-left: auto; color: var(--accent); }
.tablist .mark { position: absolute; left: 0; right: 0; top: 0; height: 34px; pointer-events: none;
                 background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent), var(--section);
                 transition: transform .35s var(--ease); }
.tablist .mark::before { content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 3px; background: var(--accent);
                         box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent); transition: top .18s, bottom .18s; }
.tablist .mark.moving::before { top: 0; bottom: 0; }

.badge { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); margin: 0 12px; padding-inline: 2px; }
.badge .ico-user { width: 18px; height: 18px; color: var(--accent); }
.badge .name { line-height: 1.15; }
.badge .name small { display: block; font-size: inherit; color: var(--dim); }
.badge .name small::before { content: ""; display: inline-block; width: 4px; height: 4px; margin: 0 5px 2px 0; background: var(--ok); animation: blink 2s steps(1) infinite; }

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; }
.toast { position: relative; min-width: 220px; max-width: min(380px, calc(100vw - 32px)); padding: 6px 12px 8px 14px; background: var(--frame);
         border: 1px solid var(--border); box-shadow: 0 0 0 1px var(--outline), 0 10px 30px rgba(0, 0, 0, .5);
         animation: toast-in .35s var(--ease); pointer-events: auto; overflow: hidden; }
.toast::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--c, var(--accent)); }
.toast::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: var(--c, var(--accent));
                transform-origin: left; animation: toast-life var(--life, 3.5s) linear forwards; }
.toast.out { animation: toast-out .3s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }
@keyframes toast-life { to { transform: scaleX(0); } }

.watermark { display: inline-flex; align-items: center; gap: 10px; height: 26px; padding: 0 10px; background: var(--frame);
             border: 1px solid var(--border); box-shadow: 0 0 0 1px var(--outline); white-space: nowrap; }
.watermark .bar { color: var(--dim); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--frame) 88%, transparent);
          backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar .wrap { display: flex; align-items: center; gap: 22px; height: 52px; }
.topbar nav { display: flex; gap: 4px; margin-left: 12px; }
.topbar nav a { padding: 4px 10px; color: var(--dim); transition: color .15s; position: relative; }
.topbar nav a:hover { color: var(--text); }
.topbar nav a.on { color: var(--text); }
.topbar nav a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -2px; height: 2px; background: var(--accent); }
.topbar .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.menu-btn { display: none; }

section { padding: 96px 0; position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 2px; height: 11px; background: var(--accent); }
h1, h2 { font-weight: normal; margin: 0; line-height: 1.1; letter-spacing: 0; }
h1 { font-size: 48px; }
h2 { font-size: 32px; }
.lead { color: var(--dim); max-width: 56ch; margin: 14px 0 0; }
.sec-head { margin-bottom: 40px; }
.sec-head.center { text-align: center; }
.sec-head.center .lead { margin-inline: auto; }

.hero { padding: 72px 0 120px; overflow: hidden; }
.hero::before {
    content: ""; position: absolute; left: -50%; right: -50%; bottom: -10%; height: 70%; pointer-events: none;
    background:
        repeating-linear-gradient(90deg, color-mix(in srgb, var(--border) 70%, transparent) 0 1px, transparent 1px 64px),
        repeating-linear-gradient(0deg, color-mix(in srgb, var(--border) 70%, transparent) 0 1px, transparent 1px 64px);
    transform: perspective(500px) rotateX(62deg); transform-origin: bottom;
    -webkit-mask: linear-gradient(transparent, #000 60%); mask: linear-gradient(transparent, #000 60%);
    opacity: .55;
}
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
               background: radial-gradient(60% 50% at 70% 40%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%); }
.hero .wrap { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 72px; text-align: center; }
.hero .lead { margin-inline: auto; }
.hero .cta, .hero .meta { justify-content: center; }
.hero h1 { font-size: 64px; }
.hero-sub { margin: 12px 0 0; font-size: 26px; color: var(--accent); }
.hero .cta { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.hero .meta { display: flex; gap: 22px; margin-top: 30px; color: var(--dim); flex-wrap: wrap; }
.hero .meta b { color: var(--text); font-weight: normal; }

.stage { position: relative; width: 736px; max-width: 100%; }
.stage .shot { transition: opacity .35s, transform .35s var(--ease); }
.stage .shot img { width: 100%; height: auto; }
.stage.hidden-menu .shot { opacity: 0; transform: translateY(8px); }
.stage .hud { position: absolute; z-index: 3; font-size: var(--fs); }
.hud-keys { text-align: left; left: -150px; top: 70px; min-width: 150px; background: var(--frame); border: 1px solid var(--border); box-shadow: 0 0 0 1px var(--outline), 0 10px 30px rgba(0,0,0,.4); }
.hud-keys header { padding: 3px 9px; border-bottom: 1px solid var(--border); }
.hud-keys div { display: flex; justify-content: space-between; padding: 2px 9px; }
.hud-keys div span:last-child { color: var(--accent); }
.hud-wm { right: -60px; top: -42px; }
.hud-note { right: -130px; bottom: 40px; }
.hud-note .toast { text-align: left; }
.hud-note .toast { animation: none; }
.hud-note .toast::after { animation: none; transform: scaleX(.6); }
.swatches { display: flex; gap: 8px; margin-top: 28px; justify-content: center; flex-wrap: wrap; align-items: center; }
.swatches .lbl { color: var(--dim); margin-right: 4px; }
.sw { width: 22px; height: 22px; padding: 0; cursor: pointer; border: 1px solid var(--border); box-shadow: 0 0 0 1px var(--outline);
      background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%); transition: transform .15s; }
.sw:hover { transform: translateY(-2px); }
.sw.on { outline: 1px solid var(--text); outline-offset: 2px; }

.tour { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 0; }
.tour .side { background: linear-gradient(color-mix(in srgb, var(--frame) 70%, var(--hover)), var(--frame)); border-right: 1px solid var(--border); padding: 10px 0; display: flex; flex-direction: column; }
.tour .side .tab small { margin-left: auto; color: var(--dim); }
.tour .view { padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tour .view .frame { position: relative; width: 100%; max-width: 734px; margin: 0 auto; aspect-ratio: 734 / 486; background: var(--frame); box-shadow: 0 0 0 1px var(--border), 0 0 0 2px var(--outline); }
.tour .view .frame img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .3s; }
.tour .view .frame img.on { opacity: 1; }
.tour .caption { width: 100%; max-width: 734px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.tour .caption h3 { margin: 0 0 4px; font-weight: normal; font-size: 20px; }
.tour .caption p { margin: 0; color: var(--dim); }

.grid { display: grid; gap: 14px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feat .gbox-body { gap: 8px; min-height: 120px; }
.feat p { margin: 0; color: var(--dim); }
.feat .demo { margin-top: auto; padding-top: 6px; }

.playground { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.cross-preview { height: 120px; background: var(--frame); border: 1px solid var(--border); overflow: hidden; }
.cross-preview canvas { display: block; width: 100%; height: 100%; }

.theme-card { cursor: pointer; padding: 0; text-align: left; border: 1px solid var(--border); background: var(--section); transition: border-color .2s, transform .2s var(--ease); }
.theme-card:hover { transform: translateY(-3px); }
.theme-card.on { border-color: var(--accent); }
.theme-card img { width: 100%; height: auto; aspect-ratio: 734 / 486; object-fit: cover; border-bottom: 1px solid var(--border); }
.theme-card .meta { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.theme-card .meta .chips { margin-left: auto; display: flex; gap: 2px; }
.theme-card .meta .chips i { width: 10px; height: 10px; background: var(--x); outline: 1px solid #000; }

.flow { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 14px; top: 14px; bottom: 14px; width: 1px; background: var(--border); }
.steps li { position: relative; display: grid; grid-template-columns: 29px minmax(0, 1fr); gap: 12px; padding: 10px 0; cursor: pointer; }
.steps li .n { position: relative; z-index: 1; display: grid; place-items: center; width: 29px; height: 29px; background: var(--frame); border: 1px solid var(--border); color: var(--dim); transition: all .2s; }
.steps li b { font-weight: normal; display: block; transition: color .2s; color: var(--dim); }
.steps li p { margin: 2px 0 0; color: var(--dim); font-size: var(--fs); opacity: .8; }
.steps li.on .n, .steps li:hover .n { border-color: var(--accent); color: var(--accent); }
.steps li.on b { color: var(--text); }
.flow-stage { position: relative; min-height: 470px; display: grid; place-items: center;
              background:
                radial-gradient(50% 60% at 50% 50%, color-mix(in srgb, var(--accent) 10%, transparent), transparent),
                repeating-linear-gradient(0deg, transparent 0 31px, color-mix(in srgb, var(--border) 60%, transparent) 31px 32px),
                repeating-linear-gradient(90deg, transparent 0 31px, color-mix(in srgb, var(--border) 60%, transparent) 31px 32px),
                var(--frame);
              border: 1px solid var(--border); overflow: hidden; }
.flow-stage img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.97); opacity: 0;
                  transition: opacity .35s, transform .45s var(--ease); box-shadow: 0 20px 60px rgba(0,0,0,.6); max-width: calc(100% - 32px); }
.flow-stage img.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th { color: var(--dim); font-weight: normal; background: color-mix(in srgb, var(--frame) 40%, var(--section)); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--hover) 50%, transparent); }
.table .name { display: flex; align-items: center; gap: 10px; }
.table-wrap { overflow-x: auto; }
.empty { padding: 26px 12px; text-align: center; color: var(--dim); }

.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 12px 14px; display: flex; gap: 10px; align-items: center; transition: color .15s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; color: var(--accent); width: 10px; }
.faq details[open] summary::before { content: "-"; }
.faq summary:hover { color: var(--accent); }
.faq details p { margin: 0; padding: 0 14px 14px 34px; color: var(--dim); }

.cta-strip { display: flex; align-items: center; gap: 24px; padding: 32px; flex-wrap: wrap; }
.cta-strip h2 { font-size: 26px; }
.cta-strip .btn-row { margin-left: auto; flex: none; }

footer { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--dim); }
footer .wrap { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
footer nav { display: flex; gap: 16px; margin-left: auto; }
footer nav a:hover { color: var(--text); }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s, transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.caret::after { content: "_"; color: var(--accent); animation: blink 1s steps(1) infinite; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; position: relative; overflow: hidden; }
.auth-page::before { content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(40% 40% at 50% 45%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%),
        repeating-linear-gradient(0deg, transparent 0 31px, color-mix(in srgb, var(--border) 45%, transparent) 31px 32px),
        repeating-linear-gradient(90deg, transparent 0 31px, color-mix(in srgb, var(--border) 45%, transparent) 31px 32px); }
.card { position: relative; width: 340px; max-width: 100%; transition: width .6s var(--ease), height .6s var(--ease), opacity .4s; overflow: hidden; }
.card.expand { width: min(860px, 100%); }
.card-head { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; margin-top: 2px;
             background: linear-gradient(color-mix(in srgb, var(--frame) 77%, #fff 3%), var(--frame)); border-bottom: 1px solid var(--border); }
.card-head .x { margin-left: auto; color: var(--dim); padding: 0 6px; }
.card-head .x:hover { color: var(--text); }
.card-body { padding: 22px 24px 18px; display: flex; flex-direction: column; gap: 10px; }
.card-body h1 { font-size: var(--fs); }
.card-switch { display: flex; gap: 0; margin-bottom: 6px; }
.card-switch.subtabs { width: 100%; }
.card-switch.subtabs button { flex: 1; }
.card-foot { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 10px 24px; border-top: 1px solid var(--border);
             background: color-mix(in srgb, var(--frame) 60%, transparent); flex-wrap: wrap; }
.card-foot .right { margin-left: auto; color: var(--dim); }
.card-foot .progress { flex-basis: 100%; }
.card-foot .msg { display: flex; align-items: center; gap: 8px; }
.card form.busy { opacity: .45; pointer-events: none; }
.card .check { width: 14px; height: 14px; color: var(--accent); }
.demo-note { margin-top: 18px; color: var(--dim); text-align: center; max-width: 340px; position: relative; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; height: 3px; margin-top: 2px; }
.pw-meter i { background: var(--element); transition: background .2s; }
.pw-meter[data-s="1"] i:nth-child(-n+1) { background: var(--bad); }
.pw-meter[data-s="2"] i:nth-child(-n+2) { background: var(--warn); }
.pw-meter[data-s="3"] i:nth-child(-n+3) { background: var(--accent); }
.pw-meter[data-s="4"] i { background: var(--ok); }

.dash-page { height: 100vh; padding: 16px; display: flex; }
.app { flex: 1; display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 0; }
.app-side { display: flex; flex-direction: column; background: linear-gradient(color-mix(in srgb, var(--frame) 77%, #fff 3%), var(--frame)); border-right: 1px solid var(--border); padding-top: 2px; min-height: 0; }
.app-side .brand { height: 52px; padding: 0 16px; border-bottom: 1px solid var(--border); margin: 0 12px; padding-inline: 2px; }
.app-side .tablist { margin-top: 10px; }
.app-side .grow { flex: 1; }
.app-side .side-links { display: flex; flex-direction: column; padding: 0 12px 8px; gap: 2px; }
.app-side .side-links a { padding: 3px 4px; color: var(--dim); }
.app-side .side-links a:hover { color: var(--text); }
.app-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.app-head { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 16px; border-bottom: 1px solid var(--border); margin-top: 2px; flex: none; }
.app-head .title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.app-head .title .ico { color: var(--accent); }
.app-head .subtabs { margin-left: auto; }
.app-head .menu-btn { margin-right: 4px; }
.app-body { flex: 1; overflow-y: auto; padding: 16px; min-height: 0; }
.page { display: none; }
.page.on { display: block; animation: page-in .35s var(--ease); }
@keyframes page-in { from { opacity: .1; transform: translateY(8px); } }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.cols > .col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cols.wide-left { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; }
.stat b { font-weight: normal; font-size: 26px; line-height: 1.1; }
.stat span { color: var(--dim); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.kv { display: flex; justify-content: space-between; gap: 12px; }
.kv > span:first-child { color: var(--dim); }
.kv > span:last-child { text-align: right; overflow: hidden; text-overflow: ellipsis; }
.log { display: flex; flex-direction: column; gap: 3px; max-height: 260px; overflow-y: auto; }
.log div { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 6px; }
.log div time { color: var(--dim); }
.mono-key { letter-spacing: .5px; }
.icon-btn { background: none; border: 0; padding: 0 4px; cursor: pointer; color: var(--dim); }
.icon-btn:hover { color: var(--accent); }
.hint { color: var(--dim); }
.hint code { color: var(--accent); font: inherit; }
.preset-list { display: flex; flex-direction: column; background: var(--frame); border: 1px solid var(--border); padding: 4px 0; }
.preset-list button { display: flex; align-items: center; gap: 8px; padding: 2px 10px; background: none; border: 0; cursor: pointer; color: var(--dim); text-align: left; }
.preset-list button:hover { color: var(--text); background: var(--element); }
.preset-list button.on { color: var(--accent); }
.preset-list button.on::after { content: "active"; margin-left: auto; }
.preset-list button i { width: 8px; height: 8px; background: var(--x); }
.color-rows .kv { align-items: center; }
.color-rows .kv i { width: 22px; height: 11px; background: var(--x); outline: 1px solid #000; }
.overlay-scrim { display: none; }

@media (max-width: 1000px) {
    .hud-keys { left: -20px; top: -30px; }
    .hud-note { right: -10px; bottom: -20px; }
    .hud-wm { right: 0; }
    .hero { padding-top: 56px; }
    .tour { grid-template-columns: 1fr; }
    .tour .side { flex-direction: row; overflow-x: auto; padding: 0; border-right: 0; border-bottom: 1px solid var(--border); }
    .tour .side .tablist { flex-direction: row; }
    .tour .side .tab { white-space: nowrap; }
    .tour .side .mark { display: none; }
    .tour .side .tab.on { box-shadow: inset 0 -2px 0 var(--accent); }
    .tour .side .tab small { display: none; }
    .flow { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cols, .cols.wide-left { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    :root { --fs: 16px; }
    h1, .hero h1 { font-size: 40px; }
    .hero-sub { font-size: 20px; }
    h2 { font-size: 26px; }
    section { padding: 64px 0; }
    .topbar nav { display: none; position: absolute; left: 0; right: 0; top: 52px; flex-direction: column; margin: 0; padding: 8px var(--gutter);
                  background: var(--frame); border-bottom: 1px solid var(--border); }
    .topbar nav.open { display: flex; }
    .menu-btn { display: inline-flex; }
    .topbar .actions .btn:not(.menu-btn):not(.btn-accent) { display: none; }
    .hud-keys, .hud-wm { display: none; }
    .hud-note { right: 0; bottom: -40px; }
    .grid-3, .grid-2, .playground { grid-template-columns: minmax(0, 1fr); }
    .tour .caption { grid-template-columns: 1fr; }
    .flow-stage { min-height: 420px; }
    .cta-strip .btn-row { margin-left: 0; }
    footer nav { margin-left: 0; }

    .dash-page { padding: 0; height: 100dvh; }
    .app { grid-template-columns: 1fr; }
    .app-side { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; width: 230px; transform: translateX(-100%); transition: transform .3s var(--ease); }
    .app.nav-open .app-side { transform: none; }
    .app.nav-open .overlay-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.5); }
    .app-head { flex-wrap: wrap; height: auto; padding: 8px 12px; }
    .app-head .subtabs { margin-left: 0; width: 100%; }
    .app-head .subtabs button { flex: 1; padding: 0 6px; }
    .app-body { padding: 12px; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
}

.shop-card {
    --mx: 50%; --my: 0%;
    position: relative; display: flex; flex-direction: column; gap: 16px; padding: 20px;
    background:
        radial-gradient(260px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
        linear-gradient(color-mix(in srgb, var(--section) 70%, var(--hover)), var(--section) 140px);
    border: 1px solid var(--border);
    box-shadow: 0 0 0 1px var(--outline), 0 18px 40px -20px rgba(0, 0, 0, .8);
    transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.shop-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
                     background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent)); background-size: 200% 100%; animation: flow 4s linear infinite; }
@keyframes flow { to { background-position: -200% 0; } }
.shop-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
                   box-shadow: 0 0 0 1px var(--outline), 0 24px 50px -18px color-mix(in srgb, var(--accent) 35%, #000); }

.shop-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.shop-head h3 { margin: 0; font-weight: normal; font-size: 22px; line-height: 1.1; }
.shop-head .dim { display: block; margin-top: 2px; }
.shop-tag { display: grid; place-items: center; width: 46px; height: 46px; font-size: 20px; color: var(--accent);
            background: linear-gradient(color-mix(in srgb, var(--inline) 80%, #fff 6%), var(--inline));
            border: 1px solid color-mix(in srgb, var(--accent) 70%, var(--border));
            box-shadow: 0 0 0 1px var(--outline), 0 0 18px -4px color-mix(in srgb, var(--accent) 60%, transparent); }
.shop-tag img { display: block; width: 40px; height: 40px; object-fit: contain; }
.shop-status { align-self: start; }

.shop-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 6px 0 14px; border-bottom: 1px solid var(--border); }
.shop-price > span { font-size: 26px; color: var(--accent); }
.shop-price small { font-size: inherit; }
.shop-price b { font-weight: normal; font-size: 56px; line-height: 1; color: var(--text); }

.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 4px; }
.chips.one { grid-template-columns: 1fr; }
.chip { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 9px 12px; cursor: pointer;
        background: var(--frame); border: 1px solid var(--border); color: var(--dim); transition: border-color .15s, color .15s, background .15s; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip small { font-size: inherit; color: var(--dim); }
.chip em { position: absolute; top: -9px; right: 8px; padding: 0 6px; font-style: normal; line-height: 16px; color: #fff;
           background: linear-gradient(var(--accent), var(--accent2)); box-shadow: 0 0 0 1px var(--outline); }
.chip:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); color: var(--text); }
.chip:has(input:checked) { color: var(--text); border-color: var(--accent);
                           background: linear-gradient(color-mix(in srgb, var(--accent) 18%, transparent), color-mix(in srgb, var(--accent) 4%, transparent)), var(--frame);
                           box-shadow: inset 0 -2px 0 var(--accent); }
.chip:has(input:checked) small { color: var(--accent); }
.chip:has(input:focus-visible) { outline: 1px solid var(--accent); outline-offset: 2px; }

.perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; color: var(--dim); }
.perks li::before { content: "+"; color: var(--ok); margin-right: 10px; }
.shop-buy { margin-top: auto; gap: 10px; }
.shop-buy .ico, .shop-note .btn .ico { width: 16px; height: 16px; }

.shop-note { margin-top: 14px; }
.shop-note .gbox-body { flex-direction: row; align-items: center; gap: 20px; flex-wrap: wrap; padding: 14px 16px; }
.shop-note p { margin: 4px 0 0; }
.shop-note .btn { margin-left: auto; gap: 10px; }
@media (max-width: 1000px) { #shop { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin: 0 auto; } }

.user-chip { display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 12px 0 10px;
             background: var(--frame); border: 1px solid var(--border); transition: border-color .15s, background .15s; }
.user-chip:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); background: var(--element); }
.user-chip .ico { width: 16px; height: 16px; color: var(--accent); }
.user-chip .name { display: flex; flex-direction: column; line-height: 1.05; }
.user-chip .name small { font-size: inherit; color: var(--dim); }
.user-chip .name small::before { content: ""; display: inline-block; width: 4px; height: 4px; margin: 0 5px 2px 0; background: var(--ok); animation: blink 2s steps(1) infinite; }
@media (max-width: 760px) { .topbar .actions .btn[data-user] { display: none; } .user-chip.hidden { display: none; } }
