/* ============================================================
   MIXLAR STUDIO — app shell
   Inherits brand tokens from style.min.css (--clr-red, --font-logo,
   --font-body). Canvas + card colors match labs.php's marketplace
   palette; the sidebar takes the site's existing near-black
   (#131110, already used as theme-color across Mixlar) to read as
   its own workspace rather than another marketing page.
   ============================================================ */

:root {
    --st-bg:        #f5f5f7;
    --st-panel:     #ffffff;
    --st-ink:       #1d1d1f;
    --st-muted:     rgba(29,29,31,0.55);
    --st-muted-2:   rgba(29,29,31,0.35);
    --st-border:    #e4e4e4;
    --st-red:       var(--clr-red, #FF4D14);
    --st-side-bg:   #131110;
    --st-side-ink:  rgba(255,255,255,0.92);
    --st-side-muted:rgba(255,255,255,0.42);
    --st-side-line: rgba(255,255,255,0.08);
    --st-side-w:    264px;
    --st-radius:    16px;
    --st-mono:      'JetBrains Mono', monospace;
}

.st-body {
    background: var(--st-bg);
    color: var(--st-ink);
    font-family: var(--font-body, 'Inter', sans-serif);
    -webkit-font-smoothing: antialiased;
    /* Studio has no promo banner — undo the sitewide body padding-top reserved for it */
    padding-top: 0;
}

/* Studio doesn't run the sitewide lazy-image fade script — show our images immediately */
.st-shell img {
    opacity: 1 !important;
    animation: none !important;
}

.st-shell { display: flex; min-height: 100vh; }

/* ─── Sidebar ─── */
.st-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--st-side-w);
    background: var(--st-side-bg);
    display: flex;
    flex-direction: column;
    padding: 1.6rem 1.1rem 1.4rem;
    z-index: 40;
    transition: width 0.22s cubic-bezier(0.22,1,0.36,1), transform 0.3s cubic-bezier(0.22,1,0.36,1);
}

.st-brand {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    padding: 0.3rem 0.6rem 1.4rem;
    margin-bottom: 0.6rem;
    border-bottom: 1px solid var(--st-side-line);
}
.st-brand__mark {
    width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,77,20,0.16);
}
.st-brand__mark img { width: 15px; height: 15px; object-fit: contain; display: block; }
.st-brand__full { display: flex; align-items: baseline; gap: 0.4rem; white-space: nowrap; }
.st-brand__word {
    font-family: var(--font-logo, 'Arial Black', sans-serif);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}
.st-brand__tag {
    font-family: var(--st-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--st-red);
}

.st-collapse-btn {
    position: absolute;
    top: 1.7rem;
    right: -11px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #fff;
    color: var(--st-side-bg);
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 2; flex-shrink: 0;
    transition: transform 0.15s ease;
}
.st-collapse-btn:hover { transform: scale(1.1); }
.st-collapse-btn svg { transition: transform 0.22s ease; }
html.st-nav-collapsed .st-collapse-btn svg { transform: rotate(180deg); }

.st-nav { display: flex; flex-direction: column; gap: 0.2rem; margin-top: 0.6rem; }
.st-navitem {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.6rem;
    border-radius: 11px;
    text-decoration: none;
    color: var(--st-side-muted);
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}
.st-navitem:hover { background: rgba(255,255,255,0.05); color: var(--st-side-ink); }
.st-navitem.is-active { background: rgba(255,77,20,0.12); color: #fff; }
.st-navitem.is-active .st-navitem__icon { color: var(--st-red); }
.st-navitem__icon { flex-shrink: 0; color: inherit; opacity: 0.85; }
.st-navitem.is-active .st-navitem__icon { opacity: 1; }
.st-navitem__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.st-navitem__label { font-size: 0.86rem; font-weight: 600; letter-spacing: -0.01em; color: inherit; }
.st-navitem__sub { font-size: 0.68rem; color: var(--st-side-muted); }
.st-navitem.is-active .st-navitem__sub { color: rgba(255,255,255,0.55); }

.st-sidebar__foot {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--st-side-line);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.st-status {
    display: flex; align-items: center; gap: 0.4rem;
    font-family: var(--st-mono); font-size: 0.62rem; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--st-side-muted); padding: 0 0.6rem; white-space: nowrap;
}
.st-status__dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.18); flex-shrink: 0; }
.st-exit {
    display: flex; align-items: center; gap: 0.55rem;
    font-family: var(--font-body); font-size: 0.76rem; font-weight: 500;
    color: var(--st-side-muted); text-decoration: none; padding: 0 0.6rem;
    white-space: nowrap;
    transition: color 0.15s ease;
}
.st-exit:hover { color: #fff; }
.st-exit__icon { flex-shrink: 0; }

/* ─── Collapsed state ─── */
html.st-nav-collapsed .st-shell { --st-side-w: 74px; }
html.st-nav-collapsed .st-collapsible { display: none; }
html.st-nav-collapsed .st-navitem { justify-content: center; }
html.st-nav-collapsed .st-brand { justify-content: center; }
html.st-nav-collapsed .st-exit { justify-content: center; }
html.st-nav-collapsed .st-status { justify-content: center; }
@media (max-width: 760px) {
    html.st-nav-collapsed .st-shell { --st-side-w: 264px; }
    .st-collapse-btn { display: none; }
}

.st-mobbar {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; z-index: 45;
    height: 56px;
    padding: 0 0.9rem;
    padding-top: env(safe-area-inset-top, 0);
    align-items: center; gap: 0.75rem;
    background: var(--st-side-bg);
    box-shadow: 0 2px 14px rgba(0,0,0,0.18);
}
.st-mobbar__btn {
    width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.06); color: #fff; border: none; cursor: pointer;
}
.st-mobbar__title { flex: 1; font-family: var(--font-logo, 'Arial Black', sans-serif); font-size: 0.95rem; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.st-mobbar__mark {
    width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,77,20,0.15); text-decoration: none;
}
.st-mobbar__mark img { width: 18px; height: 18px; object-fit: contain; display: block; }
.st-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 39; }
html.st-scroll-lock { overflow: hidden; }

/* ─── Main canvas ─── */
.st-main {
    margin-left: var(--st-side-w);
    flex: 1;
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.22s cubic-bezier(0.22,1,0.36,1);
}
.st-main--flush { height: 100vh; overflow-y: auto; box-sizing: border-box; background: var(--clr-bg-dark, #131110); }
.st-main--flush { padding: 0; }

.st-topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2.6rem clamp(1.25rem, 3vw, 3rem) 1.6rem;
    flex-wrap: wrap;
}
.st-topbar__eyebrow {
    display: block;
    font-family: var(--st-mono); font-size: 0.66rem; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--st-red);
    margin-bottom: 0.5rem;
}
.st-topbar__title {
    font-family: var(--font-logo, 'Arial Black', sans-serif);
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; color: var(--st-ink);
}
.st-topbar__sub { font-size: 0.88rem; color: var(--st-muted); margin-top: 0.45rem; max-width: 46ch; line-height: 1.5; }
.st-topbar__side { display: flex; align-items: center; gap: 0.65rem; flex-shrink: 0; }

.st-page {
    padding: 0 clamp(1.25rem, 3vw, 3rem) 4rem;
    flex: 1;
}

/* ─── Shared bits ─── */
.st-pill-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-family: var(--font-body); font-size: 0.78rem; font-weight: 600;
    color: #fff; background: var(--st-red); border: none; border-radius: 50px;
    padding: 0.6rem 1.15rem; cursor: pointer; text-decoration: none;
    box-shadow: 0 4px 20px rgba(255,77,20,0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.st-pill-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 26px rgba(255,77,20,0.4); }
.st-pill-btn--ghost {
    background: var(--st-panel); color: var(--st-ink); box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    border: 1px solid var(--st-border);
}
.st-pill-btn--ghost:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }

.st-search {
    position: relative;
}
.st-search input {
    width: 100%; min-width: 220px;
    padding: 0.62rem 1rem 0.62rem 2.35rem;
    font-family: var(--font-body); font-size: 0.85rem; color: var(--st-ink);
    background: var(--st-panel); border: 1px solid var(--st-border); border-radius: 11px;
    outline: none; box-shadow: 0 1px 6px rgba(0,0,0,0.05); transition: box-shadow 0.15s ease;
    box-sizing: border-box;
}
.st-search input:focus { box-shadow: 0 0 0 3px rgba(255,77,20,0.12); }
.st-search::before {
    content: '\f002'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
    font-size: 0.75rem; color: var(--st-muted-2);
}

/* ─── Overview: hero + section cards ─── */
.st-hero {
    background: var(--st-panel);
    border: 1px solid var(--st-border);
    border-radius: 20px;
    padding: 2.4rem clamp(1.5rem, 3vw, 2.6rem);
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2.4rem;
}
.st-hero__eyebrow { font-family: var(--st-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--st-red); margin-bottom: 0.7rem; }
.st-hero__heading { font-family: var(--font-logo, 'Arial Black', sans-serif); font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; margin-bottom: 0.9rem; }
.st-hero__heading em { font-style: normal; color: var(--st-red); }
.st-hero__body { font-size: 0.92rem; color: var(--st-muted); line-height: 1.65; max-width: 52ch; }
.st-hero__stats { display: flex; flex-direction: column; gap: 0.9rem; border-left: 1px solid var(--st-border); padding-left: 2rem; }
.st-hero__stat { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.st-hero__stat b { font-family: var(--font-logo, 'Arial Black', sans-serif); font-size: 1.5rem; letter-spacing: -0.02em; }
.st-hero__stat span { font-family: var(--st-mono); font-size: 0.63rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--st-muted); text-align: right; }

.st-apps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.1rem;
    margin-bottom: 2.6rem;
}
.st-appcard {
    background: var(--st-panel);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    padding: 1.5rem 1.4rem;
    text-decoration: none;
    color: var(--st-ink);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}
.st-appcard:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0,0,0,0.09); }
.st-appcard__icon {
    width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,77,20,0.08); color: var(--st-red); font-size: 1.05rem;
}
.st-appcard__title { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }
.st-appcard__desc { font-size: 0.8rem; color: var(--st-muted); line-height: 1.55; flex: 1; }
.st-appcard__go { font-family: var(--st-mono); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--st-red); display: flex; align-items: center; gap: 0.35rem; }
.st-appcard__badge {
    position: absolute; top: 1.2rem; right: 1.2rem;
    font-family: var(--st-mono); font-size: 0.56rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
    padding: 2px 8px; border-radius: 50px; background: rgba(37,99,235,0.1); color: #2563eb;
}

.st-section { margin-bottom: 2.6rem; }
.st-section__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1rem; gap: 1rem; flex-wrap: wrap; }
.st-section__title { font-family: var(--font-logo, 'Arial Black', sans-serif); font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
.st-section__link { font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; color: var(--st-red); text-decoration: none; }
.st-section__link:hover { text-decoration: underline; }

.st-activity { display: flex; flex-direction: column; gap: 0.55rem; }
.st-activity__row {
    display: flex; align-items: center; gap: 0.9rem;
    background: var(--st-panel); border: 1px solid var(--st-border); border-radius: 12px;
    padding: 0.8rem 1.1rem;
}
.st-activity__icon { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: #fff; flex-shrink: 0; }
.st-activity__body { flex: 1; min-width: 0; }
.st-activity__name { font-size: 0.83rem; font-weight: 600; }
.st-activity__meta { font-size: 0.72rem; color: var(--st-muted); }
.st-activity__tag { font-family: var(--st-mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--st-muted); flex-shrink: 0; }

/* ─── Plugins page ─── */
.st-filterbar { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.st-chip {
    font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; color: var(--st-muted);
    background: var(--st-panel); border: 1px solid var(--st-border); border-radius: 50px;
    padding: 0.42rem 0.95rem; cursor: pointer; transition: all 0.15s ease;
}
.st-chip:hover { color: var(--st-ink); }
.st-chip.is-active { background: var(--st-ink); color: #fff; border-color: var(--st-ink); }

.st-plugingrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.st-plugin {
    background: var(--st-panel); border: 1px solid var(--st-border); border-radius: 14px;
    padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.55rem;
    position: relative; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.st-plugin:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,0.09); }
.st-plugin__icon {
    width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1rem;
}
.st-plugin__name { font-size: 0.9rem; font-weight: 700; letter-spacing: -0.01em; }
.st-plugin__author { font-family: var(--st-mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--st-muted); }
.st-plugin__desc { font-size: 0.75rem; color: var(--st-muted); line-height: 1.55; flex: 1; }
.st-plugin__badge {
    position: absolute; top: 0.9rem; right: 0.9rem;
    font-family: var(--st-mono); font-size: 0.56rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
    padding: 2px 8px; border-radius: 50px; background: rgba(212,43,43,0.08); color: var(--st-red);
}
.st-plugin__badge--live { background: rgba(34,197,94,0.1); color: #16a34a; }
.st-plugin__badge--verified { background: rgba(59,130,246,0.1); color: #2563eb; }
.st-plugin__link { font-family: var(--font-body); font-size: 0.72rem; font-weight: 600; color: var(--st-red); text-decoration: none; margin-top: 0.15rem; }
.st-plugin__link:hover { text-decoration: underline; }
.st-plugin--hidden { display: none; }
.st-empty { grid-column: 1/-1; text-align: center; padding: 3rem 1rem; color: var(--st-muted); font-size: 0.88rem; }

/* ─── Builder — native, not framed ─── */

/* ─── Builder home (Figma-style dashboard) ─── */
.bd-home {
    background: var(--clr-bg-dark, #131110);
    min-height: 100%;
    padding: 2.6rem clamp(1.25rem, 3vw, 3rem) 4rem;
}
.bd-home[hidden] { display: none; }
.bd-home__top { max-width: 1040px; margin: 0 auto 2.6rem; }
.bd-home__title {
    font-family: var(--font-logo, 'Arial Black', sans-serif);
    font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700; letter-spacing: -0.03em;
    color: #fff; margin-bottom: 0.4rem;
}
.bd-home__sub { font-size: 0.9rem; color: rgba(255,255,255,0.45); margin-bottom: 1.6rem; }
.bd-home__actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.bd-newbtn {
    display: inline-flex; align-items: center; gap: 0.45rem;
    font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; color: #fff;
    background: var(--st-red); border: none; border-radius: 10px; padding: 0.7rem 1.3rem;
    cursor: pointer; box-shadow: 0 4px 20px rgba(255,77,20,0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.bd-newbtn:hover { transform: translateY(-1px); box-shadow: 0 6px 26px rgba(255,77,20,0.4); }
.bd-importbtn {
    font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
    padding: 0.7rem 1.2rem; cursor: not-allowed;
}
.bd-home__search { position: relative; margin-left: auto; min-width: 220px; }
.bd-home__search input {
    width: 100%; box-sizing: border-box;
    padding: 0.6rem 0.9rem 0.6rem 2.2rem;
    font-family: var(--font-body); font-size: 0.82rem; color: #fff;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
    outline: none; transition: border-color 0.15s ease;
}
.bd-home__search input::placeholder { color: rgba(255,255,255,0.3); }
.bd-home__search input:focus { border-color: var(--st-red); }
.bd-home__search::before {
    content: '\f002'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%);
    font-size: 0.72rem; color: rgba(255,255,255,0.3);
}

.bd-section { max-width: 1040px; margin: 0 auto 2.4rem; }
.bd-section__title { font-family: var(--st-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 1rem; }

.bd-templates { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.bd-tplcard {
    background: #1B1916; border: 1px solid rgba(255,255,255,0.07); border-radius: 14px;
    padding: 0; overflow: hidden; cursor: pointer; text-align: left;
    display: flex; flex-direction: column; font: inherit; color: inherit;
    transition: transform 0.18s ease, border-color 0.18s ease;
}
.bd-tplcard:hover { transform: translateY(-3px); border-color: rgba(255,77,20,0.35); }
.bd-tplcard__thumb {
    position: relative; height: 92px; background: #131110;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.bd-tplcard__name { font-size: 0.82rem; font-weight: 700; color: #fff; padding: 0.75rem 0.9rem 0.15rem; }
.bd-tplcard__desc { font-size: 0.7rem; color: rgba(255,255,255,0.4); line-height: 1.4; padding: 0 0.9rem 0.85rem; }

/* thumbnail mockups — abstract, not fake renders */
.bd-thumb__clock { font-family: var(--st-mono); font-size: 1.1rem; font-weight: 700; color: #fff; }
.bd-thumb--dashboard { flex-direction: column; align-items: stretch; padding: 0 1.4rem; gap: 5px; }
.bd-thumb__bar { display: block; height: 6px; border-radius: 3px; background: var(--st-red); opacity: 0.85; }
.bd-thumb__bar:nth-child(2) { background: #1DB954; }
.bd-thumb--controls .bd-thumb__btn { width: 26px; height: 18px; border-radius: 5px; background: rgba(255,255,255,0.14); }
.bd-thumb--controls .bd-thumb__toggle { width: 24px; height: 14px; border-radius: 20px; background: #1DB954; position: relative; }
.bd-thumb--controls .bd-thumb__toggle::after { content: ''; position: absolute; right: 2px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.bd-thumb__qr {
    width: 46px; height: 46px; border-radius: 4px;
    background:
        linear-gradient(90deg, #fff 0 25%, transparent 25% 50%, #fff 50% 75%, transparent 75%) 0 0/100% 34%,
        linear-gradient(90deg, transparent 0 25%, #fff 25% 50%, transparent 50% 75%, #fff 75%) 0 33%/100% 34%,
        linear-gradient(90deg, #fff 0 25%, transparent 25% 50%, #fff 50% 75%, transparent 75%) 0 67%/100% 34%;
    background-repeat: no-repeat;
}
.bd-tplcard--blank .bd-tplcard__thumb { border-style: dashed; }
.bd-thumb__plus { font-size: 1.6rem; font-weight: 300; color: rgba(255,255,255,0.3); line-height: 1; }
.bd-tplcard--blank { border-style: dashed; border-color: rgba(255,255,255,0.14); background: transparent; }
.bd-tplcard--hidden { display: none; }

.bd-empty {
    display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
    padding: 2.6rem 1.5rem; border: 1px dashed rgba(255,255,255,0.1); border-radius: 14px;
    text-align: center;
}
.bd-empty svg { color: rgba(255,255,255,0.25); }
.bd-empty p { font-size: 0.82rem; color: rgba(255,255,255,0.4); max-width: 32ch; }

/* ─── Builder editor toolbar ─── */
.bd-editor[hidden] { display: none; }
.bd-toolbar {
    display: flex; align-items: center; gap: 0.85rem;
    padding: 0.7rem clamp(1.25rem, 3vw, 3rem);
    background: #1B1916; border-bottom: 1px solid rgba(255,255,255,0.07);
    position: sticky; top: 0; z-index: 5;
}
.bd-toolbar__back {
    width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.06); color: #fff; border: none; cursor: pointer;
    transition: background 0.15s ease;
}
.bd-toolbar__back:hover { background: rgba(255,255,255,0.12); }
.bd-toolbar__name { font-family: var(--font-body); font-size: 0.86rem; font-weight: 600; color: #fff; }
.bd-toolbar__meta { font-family: var(--st-mono); font-size: 0.64rem; color: rgba(255,255,255,0.35); margin-left: auto; white-space: nowrap; }

@media (max-width: 1080px) { .bd-templates { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) {
    .bd-templates { grid-template-columns: repeat(2, 1fr); }
    .bd-home__search { margin-left: 0; flex-basis: 100%; }
    .bd-toolbar__meta { display: none; }
}

/* ─── Boot loader ─── */
.st-loader {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center;
    background: var(--st-side-bg);
    opacity: 1; transition: opacity 0.35s ease;
}
.st-loader.is-done { opacity: 0; pointer-events: none; }
.st-loader__inner { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }
.st-loader__word {
    font-family: var(--font-logo, 'Arial Black', sans-serif);
    font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; color: #fff;
}
.st-loader__dot {
    color: var(--st-red);
    animation: stLoaderPulse 1s ease-in-out infinite;
}
@keyframes stLoaderPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.st-loader__bar { width: 160px; height: 3px; border-radius: 3px; background: rgba(255,255,255,0.12); overflow: hidden; }
.st-loader__fill {
    display: block; height: 100%; width: 30%; border-radius: 3px;
    background: var(--st-red);
    animation: stLoaderFill 1.4s cubic-bezier(0.22,1,0.36,1) infinite;
}
@keyframes stLoaderFill {
    0%   { transform: translateX(-100%); width: 40%; }
    60%  { transform: translateX(220%); width: 55%; }
    100% { transform: translateX(220%); width: 55%; }
}
.st-loader__label { font-family: var(--st-mono); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.4); }
@media (prefers-reduced-motion: reduce) {
    .st-loader__dot, .st-loader__fill { animation: none; }
}

/* ─── Docs page ─── */
.st-docs { display: grid; grid-template-columns: 240px 1fr; gap: 2.4rem; align-items: start; }
.st-docs__toc { position: sticky; top: 2rem; display: flex; flex-direction: column; gap: 0.2rem; }
.st-docs__toclabel { font-family: var(--st-mono); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--st-muted); margin-bottom: 0.6rem; }
.st-docs__tocitem { font-size: 0.85rem; font-weight: 500; color: var(--st-muted); text-decoration: none; padding: 0.45rem 0.7rem; border-radius: 8px; transition: background 0.15s ease, color 0.15s ease; }
.st-docs__tocitem:hover { background: rgba(0,0,0,0.04); color: var(--st-ink); }

.st-doc {
    background: var(--st-panel); border: 1px solid var(--st-border); border-radius: var(--st-radius);
    padding: 1.8rem 2rem; margin-bottom: 1.2rem; scroll-margin-top: 1.5rem;
}
.st-doc__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.7rem; }
.st-doc__title { font-family: var(--font-logo, 'Arial Black', sans-serif); font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
.st-doc__status { font-family: var(--st-mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 9px; border-radius: 50px; flex-shrink: 0; white-space: nowrap; }
.st-doc__status--wip { background: rgba(245,158,11,0.12); color: #b45309; }
.st-doc__status--live { background: rgba(34,197,94,0.1); color: #16a34a; }
.st-doc__body { font-size: 0.88rem; color: var(--st-muted); line-height: 1.7; }
.st-doc__list { margin: 0.7rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }
.st-doc__list li { font-size: 0.85rem; color: var(--st-ink); display: flex; align-items: baseline; gap: 0.5rem; }
.st-doc__list li::before { content: '\2192'; color: var(--st-red); font-weight: 700; flex-shrink: 0; }

/* ─── AI Support ─── */
.st-support { display: grid; grid-template-columns: 1fr 300px; gap: 1.6rem; align-items: start; }
.st-chat {
    background: var(--st-panel); border: 1px solid var(--st-border); border-radius: var(--st-radius);
    display: flex; flex-direction: column; height: min(560px, 70vh); overflow: hidden;
}
.st-chat__log { flex: 1; overflow-y: auto; padding: 1.6rem; display: flex; flex-direction: column; gap: 1rem; }
.st-msg { display: flex; gap: 0.7rem; max-width: 80%; }
.st-msg--bot { align-self: flex-start; }
.st-msg--user { align-self: flex-end; flex-direction: row-reverse; }
.st-msg__avatar { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; flex-shrink: 0; }
.st-msg--bot .st-msg__avatar { background: var(--st-ink); color: #fff; }
.st-msg--user .st-msg__avatar { background: rgba(255,77,20,0.12); color: var(--st-red); }
.st-msg__bubble { font-size: 0.85rem; line-height: 1.55; padding: 0.7rem 1rem; border-radius: 13px; }
.st-msg--bot .st-msg__bubble { background: var(--st-bg); color: var(--st-ink); border-bottom-left-radius: 3px; }
.st-msg--user .st-msg__bubble { background: var(--st-ink); color: #fff; border-bottom-right-radius: 3px; }
.st-chat__composer {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.9rem 1.1rem; border-top: 1px solid var(--st-border);
}
.st-chat__composer input {
    flex: 1; border: 1px solid var(--st-border); border-radius: 50px; padding: 0.65rem 1.1rem;
    font-family: var(--font-body); font-size: 0.85rem; background: var(--st-bg); outline: none;
}
.st-chat__composer input:disabled { color: var(--st-muted-2); cursor: not-allowed; }
.st-chat__composer button {
    width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--st-red); color: #fff;
    display: flex; align-items: center; justify-content: center; cursor: not-allowed; opacity: 0.5; flex-shrink: 0;
}
.st-support__side { display: flex; flex-direction: column; gap: 1rem; }
.st-supportcard {
    background: var(--st-panel); border: 1px solid var(--st-border); border-radius: 14px; padding: 1.2rem 1.3rem;
}
.st-supportcard__title { font-size: 0.85rem; font-weight: 700; margin-bottom: 0.4rem; }
.st-supportcard__desc { font-size: 0.78rem; color: var(--st-muted); line-height: 1.55; margin-bottom: 0.8rem; }
.st-supportcard a.st-pill-btn { width: 100%; justify-content: center; box-sizing: border-box; }

/* ─── Responsive ─── */
@media (max-width: 1080px) {
    .st-apps { grid-template-columns: repeat(2, 1fr); }
    .st-plugingrid { grid-template-columns: repeat(3, 1fr); }
    .st-hero { grid-template-columns: 1fr; }
    .st-hero__stats { border-left: none; border-top: 1px solid var(--st-border); padding-left: 0; padding-top: 1.2rem; flex-direction: row; flex-wrap: wrap; }
    .st-hero__stat { flex-direction: column; align-items: flex-start; gap: 0.2rem; flex: 1; min-width: 120px; }
    .st-hero__stat span { text-align: left; }
    .st-support { grid-template-columns: 1fr; }
    .st-docs { grid-template-columns: 1fr; }
    .st-docs__toc { position: static; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 760px) {
    .st-mobbar { display: flex; }
    .st-sidebar {
        transform: translateX(-100%);
        box-shadow: 0 0 40px rgba(0,0,0,0.3);
        padding-top: calc(1.6rem + 56px + env(safe-area-inset-top, 0px));
        width: 264px !important;
    }
    .st-shell.is-nav-open .st-sidebar { transform: translateX(0); }
    .st-shell.is-nav-open .st-overlay { display: block; }
    .st-main {
        margin-left: 0 !important;
        padding-top: calc(56px + env(safe-area-inset-top, 0px));
    }
    .st-main--flush { height: 100vh; }
    .st-apps { grid-template-columns: 1fr; }
    .st-plugingrid { grid-template-columns: repeat(2, 1fr); }
    .st-topbar { padding-top: 1.8rem; }
    .st-collapse-btn { display: none; }
}
@media (max-width: 480px) {
    .st-plugingrid { grid-template-columns: 1fr; }
}
