/* ==========================================================================
   Baza web: site stylesheet

   Built on the Studio theme of the Baza plugins (baza_shared/web/studio.css):
   the same colour tokens, light and dark, the same machined panels with a
   1px sheen, engraved small-caps labels and LED readouts. The page should
   feel like the plugin window opened up into a website.

   Every hue carries one meaning, as in the plugins:
     amber   -> the primary action, and software (Drums, Counterpoint)
     cyan    -> Loops
     magenta -> Artist Packs
     butter  -> Videos (--f-hats)
     teal    -> TR-8S Kit Creator (--f-toms)
     green   -> OK / active states, red -> errors, revoked, locks
   ========================================================================== */

@font-face {
    font-family: "InterVariable";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/InterVariable.woff2") format("woff2");
}

/* ---------------- Tokens: Studio, light ---------------- */
:root {
    color-scheme: light;

    --bg: #e7e3dd;
    --chassis: #f5f3ef;
    --rail: #ddd8d0;
    --well: #d5cfc6;
    --paper: #fbfaf7;
    --line: rgba(40, 32, 24, 0.18);
    --line-soft: rgba(40, 32, 24, 0.10);
    --sheen: rgba(255, 255, 255, 0.7);
    --tick: rgba(40, 32, 24, 0.16);
    --shadow: 0 1px 2px rgba(40, 32, 24, 0.06), 0 8px 24px rgba(40, 32, 24, 0.08);
    --shadow-lg: 0 2px 6px rgba(40, 32, 24, 0.08), 0 24px 60px rgba(40, 32, 24, 0.16);

    --text: #1e1b18;
    --muted: #5c554c;
    --faint: #918879;

    --amber: #c2620a;
    --amber-dim: rgba(194, 98, 10, 0.16);
    --cyan: #0e7c8c;
    --cyan-dim: rgba(14, 124, 140, 0.16);
    --magenta: #ba2f78;
    --magenta-dim: rgba(186, 47, 120, 0.16);
    --red: #c62828;
    --red-dim: rgba(198, 40, 40, 0.14);
    --green: #14804a;
    --green-dim: rgba(20, 128, 74, 0.14);

    --f-core: #d94f13;
    --f-hats: #a37800;
    --f-hats-dim: rgba(163, 120, 0, 0.16);
    --f-toms: #0d7f79;
    --f-toms-dim: rgba(13, 127, 121, 0.16);
    --f-perc: #c2306a;

    --gen-bg: #d9660f;
    --gen-text: #ffffff;
    --on-color: #ffffff;

    --radius-lg: 12px;
    --radius: 7px;
    --radius-sm: 5px;
    --t: 0.14s ease;

    --font: "InterVariable", "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
    --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
    --wrap: 1200px;
    --gutter: 24px;
    --header-h: 60px;
}

/* ---------------- Tokens: Studio, dark ---------------- */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #131215; --chassis: #201e23; --rail: #2a272e; --well: #0f0e11; --paper: #1a191d;
        --line: rgba(255,255,255,0.10); --line-soft: rgba(255,255,255,0.055);
        --sheen: rgba(255,255,255,0.07); --tick: rgba(255,255,255,0.14);
        --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.3);
        --shadow-lg: 0 2px 6px rgba(0,0,0,0.4), 0 24px 60px rgba(0,0,0,0.5);
        --text: #f3efe8; --muted: #a49c91; --faint: #6d6558;
        --amber: #ffb020; --amber-dim: rgba(255,176,32,0.16);
        --cyan: #2fd3d3; --cyan-dim: rgba(47,211,211,0.14);
        --magenta: #ff5ea8; --magenta-dim: rgba(255,94,168,0.15);
        --red: #ff4d4d; --red-dim: rgba(255,77,77,0.15);
        --green: #2fd07d; --green-dim: rgba(47,208,125,0.14);
        --f-core: #ff6b35; --f-hats: #ffc94d; --f-hats-dim: rgba(255,201,77,0.15);
        --f-toms: #35d3c6; --f-toms-dim: rgba(53,211,198,0.15); --f-perc: #ff5d8f;
        --gen-bg: #ff8a1f; --gen-text: #1a1005; --on-color: #1a1005;
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #131215; --chassis: #201e23; --rail: #2a272e; --well: #0f0e11; --paper: #1a191d;
    --line: rgba(255,255,255,0.10); --line-soft: rgba(255,255,255,0.055);
    --sheen: rgba(255,255,255,0.07); --tick: rgba(255,255,255,0.14);
    --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 2px 6px rgba(0,0,0,0.4), 0 24px 60px rgba(0,0,0,0.5);
    --text: #f3efe8; --muted: #a49c91; --faint: #6d6558;
    --amber: #ffb020; --amber-dim: rgba(255,176,32,0.16);
    --cyan: #2fd3d3; --cyan-dim: rgba(47,211,211,0.14);
    --magenta: #ff5ea8; --magenta-dim: rgba(255,94,168,0.15);
    --red: #ff4d4d; --red-dim: rgba(255,77,77,0.15);
    --green: #2fd07d; --green-dim: rgba(47,208,125,0.14);
    --f-core: #ff6b35; --f-hats: #ffc94d; --f-hats-dim: rgba(255,201,77,0.15);
    --f-toms: #35d3c6; --f-toms-dim: rgba(53,211,198,0.15); --f-perc: #ff5d8f;
    --gen-bg: #ff8a1f; --gen-text: #1a1005; --on-color: #1a1005;
}

/* Area hues: a page or a block sets --hue for its area */
.hue-amber   { --hue: var(--amber);   --hue-dim: var(--amber-dim); }
.hue-cyan    { --hue: var(--cyan);    --hue-dim: var(--cyan-dim); }
.hue-magenta { --hue: var(--magenta); --hue-dim: var(--magenta-dim); }
.hue-butter  { --hue: var(--f-hats);  --hue-dim: var(--f-hats-dim); }
.hue-teal    { --hue: var(--f-toms);  --hue-dim: var(--f-toms-dim); }

/* ---------------- Reset + base ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 20px); }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font: 400 15px/1.6 var(--font);
    font-feature-settings: "cv11", "ss03";
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    --hue: var(--amber);
    --hue-dim: var(--amber-dim);
}
main { flex: 1; }
h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-weight: 750; letter-spacing: -0.02em; line-height: 1.15; }
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--amber-dim); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: calc(820px + 2 * var(--gutter)); }

.svg-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.svg-icon.fill { fill: currentColor; stroke: none; }

/* ---------------- Type ---------------- */
.label, .eyebrow {
    font-size: 10.5px;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--hue); font-size: 11px; letter-spacing: 0.16em; }
.eyebrow::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--hue);
    box-shadow: 0 0 0 3px var(--hue-dim), 0 0 10px var(--hue);
}
.display { font-size: clamp(40px, 6.2vw, 76px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.0; }
.h1 { font-size: clamp(32px, 4vw, 44px); font-weight: 800; letter-spacing: -0.03em; }
.h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 780; letter-spacing: -0.025em; }
.h3 { font-size: 19px; font-weight: 720; letter-spacing: -0.012em; }
.lead { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.55; color: var(--muted); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 0.9em; }
.accent { color: var(--hue); }
.link { color: var(--hue); font-weight: 600; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.stack > * + * { margin-top: var(--stack, 16px); }

/* The plugin's wordmark: BAZA in heavy caps, the product in light */
.wordmark { font-size: 15px; font-weight: 800; letter-spacing: 0.19em; white-space: nowrap; }
.wordmark em { font-style: normal; font-weight: 350; color: var(--muted); margin-left: 6px; }

/* ---------------- Surfaces ---------------- */
.panel {
    background: var(--chassis);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: inset 0 1px 0 var(--sheen);
}
.panel-pad { padding: 24px; }
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line-soft);
}
.panel-head .label { color: var(--muted); }
.panel-body { padding: 20px; }
.panel-foot { padding: 14px 20px; border-top: 1px solid var(--line-soft); display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.well {
    background: var(--well);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.divider { height: 1px; background: var(--line-soft); border: 0; margin: 24px 0; }

/* ---------------- Buttons (the plugin's ghost buttons and the lit Generate) ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    background: var(--rail);
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 var(--sheen);
    color: var(--text);
    font-size: 11.5px;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: border-color var(--t), color var(--t), filter var(--t), transform var(--t);
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn-primary {
    background: var(--gen-bg);
    border-color: var(--gen-bg);
    color: var(--gen-text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 0 0 0 var(--amber-dim);
    font-weight: 800;
    letter-spacing: 0.13em;
}
.btn-primary:hover { border-color: var(--gen-bg); filter: brightness(1.08); box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 0 0 4px var(--amber-dim); }
.btn-hue { background: var(--hue); border-color: var(--hue); color: var(--on-color); box-shadow: inset 0 1px 0 rgba(255,255,255,0.3); }
.btn-hue:hover { border-color: var(--hue); filter: brightness(1.08); }
.btn-quiet { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn-quiet:hover { color: var(--text); background: var(--line-soft); border-color: transparent; }
.btn-danger { color: var(--red); }
.btn-danger:hover { border-color: var(--red); }
.btn-sm { height: 30px; padding: 0 11px; font-size: 10.5px; }
.btn-lg { height: 48px; padding: 0 26px; font-size: 12.5px; }
.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 30px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: 0.45; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------------- LED readout + status ---------------- */
.led {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 4px;
    background: var(--well);
    box-shadow: inset 0 0 0 1px var(--line-soft);
    font-size: 13.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--hue);
    white-space: nowrap;
}
.led small { font-size: 9.5px; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 22px;
    padding: 0 9px 0 8px;
    border-radius: 11px;
    background: var(--st-dim, var(--line-soft));
    color: var(--st, var(--muted));
    font-size: 10.5px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.ok { --st: var(--green); --st-dim: var(--green-dim); }
.status.warn { --st: var(--amber); --st-dim: var(--amber-dim); }
.status.bad { --st: var(--red); --st-dim: var(--red-dim); }
.status.info { --st: var(--cyan); --st-dim: var(--cyan-dim); }
.status.plain::before { display: none; }

.tag {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 4px;
    background: var(--well);
    box-shadow: inset 0 0 0 1px var(--line-soft);
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}
.tag.lit { background: var(--hue); color: var(--on-color); box-shadow: none; }

/* ---------------- Meter: the plugin slider as a read-only gauge ---------------- */
.meter {
    position: relative;
    height: 34px;
    background: var(--well);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    --steps: 10;
    --value: 50%;
}
.meter::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--value);
    background: var(--hue-dim);
    border-right: 2px solid var(--hue);
}
.meter::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(to right,
        transparent 0 calc(100% / var(--steps) - 1px),
        var(--tick) calc(100% / var(--steps) - 1px),
        var(--tick) calc(100% / var(--steps)));
}
.meter-content {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}
.meter .plate {
    padding: 3px 6px;
    border-radius: 3px;
    background: var(--well);
    box-shadow: inset 0 0 0 1px var(--line-soft);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--muted);
}
.meter .led { padding: 2px 6px; font-size: 13px; }
.meter.leds::before {
    background: repeating-linear-gradient(to right, var(--hue) 0 3px, transparent 3px 6px);
    opacity: 0.85;
    border-right: 0;
}
.meter.full { --hue: var(--red); --hue-dim: var(--red-dim); }

/* ---------------- Forms ---------------- */
.field { display: grid; gap: 7px; }
.field + .field { margin-top: 16px; }
.field-label { font-size: 10.5px; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.field-help { font-size: 12.5px; color: var(--faint); line-height: 1.5; }
.field-error { font-size: 12.5px; font-weight: 600; color: var(--red); }
.input, .select {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    background: var(--well);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-weight: 550;
    outline: none;
    transition: border-color var(--t), box-shadow var(--t);
}
.input::placeholder { color: var(--faint); font-weight: 450; }
.input:hover, .select:hover { border-color: var(--muted); }
.input:focus, .select:focus { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-dim); }
.input.invalid { border-color: var(--red); }
.input-mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; }
.select {
    -webkit-appearance: none; appearance: none;
    padding-right: 34px;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: right 16px top 17px, right 11px top 17px;
    background-size: 5px 5px;
    background-repeat: no-repeat;
}
.input-group { display: flex; }
.input-group > .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group > .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-left: -1px; height: 40px; }
.input-search { position: relative; }
.input-search .svg-icon { position: absolute; left: 12px; top: 12px; color: var(--faint); }
.input-search .input { padding-left: 36px; }

/* The plugin's toggle chip as a checkbox: a lit square when on */
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; font-weight: 550; user-select: none; }
.check input { -webkit-appearance: none; appearance: none; margin: 0; width: 18px; height: 18px; border-radius: 4px; background: var(--well); border: 1px solid var(--line); display: grid; place-items: center; cursor: pointer; transition: background var(--t); }
.check input::after { content: ''; width: 9px; height: 5px; border-left: 2px solid var(--on-color); border-bottom: 2px solid var(--on-color); transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked { background: var(--hue); border-color: var(--hue); }
.check input:checked::after { opacity: 1; }

/* Segmented control: the plugin's chip group */
.segmented {
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    background: var(--well);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.segmented > * {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 14px;
    border: 0;
    border-radius: 3px;
    background: none;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}
.segmented > *:hover { color: var(--text); background: var(--line-soft); }
.segmented > .on {
    background: var(--hue);
    color: var(--on-color);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}
.segmented.plain > .on { background: var(--chassis); color: var(--text); box-shadow: inset 0 1px 0 var(--sheen), 0 0 0 1px var(--line); }

/* Toggle switch (power LED button) */
.switch { position: relative; display: inline-block; vertical-align: middle; width: 36px; height: 20px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 10px; background: var(--well); border: 1px solid var(--line); transition: background var(--t); }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--faint); transition: transform var(--t), background var(--t); }
.switch input:checked + span { background: var(--hue-dim); border-color: var(--hue); }
.switch input:checked + span::after { transform: translateX(16px); background: var(--hue); box-shadow: 0 0 8px var(--hue); }

/* ---------------- Alerts ---------------- */
.alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: var(--al-dim, var(--line-soft));
    border: 1px solid color-mix(in srgb, var(--al, var(--muted)) 35%, transparent);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}
.alert .svg-icon { color: var(--al); margin-top: 2px; }
.alert strong { color: var(--al); font-weight: 700; }
.alert.ok { --al: var(--green); --al-dim: var(--green-dim); }
.alert.info { --al: var(--cyan); --al-dim: var(--cyan-dim); }
.alert.warn { --al: var(--amber); --al-dim: var(--amber-dim); }
.alert.bad { --al: var(--red); --al-dim: var(--red-dim); }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
    text-align: left;
    padding: 11px 12px;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--rail);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table th:first-child { border-top-left-radius: 0; }
.table td { padding: 12px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr { transition: background var(--t); }
.table tbody tr:hover { background: var(--line-soft); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .right { text-align: right; }
.table .nowrap { white-space: nowrap; }
.table .cell-main { font-weight: 650; }
.table .cell-sub { display: block; font-size: 12.5px; color: var(--faint); font-weight: 450; }
.table code, .code { font-family: var(--mono); font-size: 12.5px; color: var(--muted); background: var(--well); padding: 2px 6px; border-radius: 3px; }

/* ---------------- Tabs ---------------- */
.tabs { display: flex; gap: 2px; box-shadow: inset 0 -1px 0 var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button {
    position: relative;
    padding: 12px 16px;
    background: none;
    border: 0;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs .on { color: var(--text); }
.tabs .on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--hue); box-shadow: 0 0 8px var(--hue); }

/* ---------------- Header ---------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    background: color-mix(in srgb, var(--chassis) 88%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: inset 0 -1px 0 var(--sheen);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.logo-tile {
    width: 32px; height: 32px;
    padding: 4px;
    display: grid; place-items: center;
    background: var(--chassis);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: inset 0 1px 0 var(--sheen);
    transition: border-color var(--t);
}
.logo-tile svg { width: 100%; height: 100%; fill: var(--text); transition: fill var(--t); }
.brand:hover .logo-tile { border-color: var(--amber); }
.brand:hover .logo-tile svg { fill: var(--amber); }

.nav { display: flex; align-items: center; gap: 2px; height: 100%; }
.nav > a, .nav > .menu > button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 0 12px;
    background: none;
    border: 0;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color var(--t);
}
.nav > a:hover, .nav > .menu > button:hover { color: var(--text); }
.nav > a.on { color: var(--text); }
.nav > a.on::after, .nav > .menu.on > button::after {
    content: '';
    position: absolute;
    left: 12px; right: 12px; bottom: -1px;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--hue);
    box-shadow: 0 0 10px var(--hue);
}
.nav > .menu { height: 100%; }
.header-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.header-end .led { font-size: 12.5px; padding: 5px 9px; --hue: var(--cyan); }
.avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: var(--rail);
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 var(--sheen);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--text);
}
.btn.nav-toggle { display: none; }

/* Dropdown menu (header Admin and account menus, row actions) */
.menu { position: relative; }
.menu-list {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    padding: 5px;
    background: var(--chassis);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: inset 0 1px 0 var(--sheen), var(--shadow-lg);
    display: none;
    z-index: 60;
}
.nav .menu-list { top: calc(100% - 4px); left: 0; right: auto; }
.menu.open .menu-list { display: block; }
.menu-list a, .menu-list button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 4px;
    background: none;
    text-align: left;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
}
.menu-list a:hover, .menu-list button:hover { background: var(--rail); }
.menu-list .svg-icon { color: var(--muted); }
.menu-list hr { border: 0; height: 1px; background: var(--line-soft); margin: 5px 0; }
.menu-list .menu-head { padding: 8px 10px 6px; }
.menu-list .menu-head b { display: block; font-size: 13.5px; overflow-wrap: anywhere; }
.menu-list .menu-head span { font-size: 12.5px; color: var(--faint); }
.menu-list .label { padding: 8px 10px 4px; display: block; color: var(--faint); }

/* ---------------- Footer ---------------- */
.site-footer {
    margin-top: 96px;
    background: var(--chassis);
    border-top: 1px solid var(--line);
    box-shadow: inset 0 1px 0 var(--sheen);
    font-size: 14px;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; padding: 48px 0 40px; }
.footer-grid h4 { font-size: 10.5px; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--muted); }
.footer-grid a:hover { color: var(--text); }
.footer-base { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: 13px; }
.footer-status { display: inline-flex; align-items: center; gap: 9px; }
.footer-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* ---------------- Page structure ---------------- */
.page-head { padding: 48px 0 28px; }
.page-head .wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.page-head .h1 { margin-top: 12px; }
.page-head .lead { margin-top: 10px; max-width: 640px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--faint); margin-bottom: 16px; }
.crumbs a:hover { color: var(--text); }
.crumbs .svg-icon { width: 12px; height: 12px; }
.section { padding: 72px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head .h2 { margin-top: 12px; }
.section-head p { margin-top: 10px; max-width: 560px; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------------- Cards ---------------- */
.card {
    display: flex;
    flex-direction: column;
    background: var(--chassis);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: inset 0 1px 0 var(--sheen);
    overflow: hidden;
    transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
a.card:hover, .card.hover:hover { border-color: color-mix(in srgb, var(--hue) 55%, var(--line)); transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--sheen), var(--shadow); }
.card-media { position: relative; aspect-ratio: 1; background: var(--well); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
a.card:hover .card-media img, .card.hover:hover .card-media img { transform: scale(1.03); }
.card-media .ui-shot { display: block; transition: transform 0.4s ease; transform-origin: top center; }
a.card:hover .card-media .ui-shot, .card.hover:hover .card-media .ui-shot { transform: scale(1.03); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; }

/* Artwork placeholder: until a pack's cover loads, a generated cover in its hue */
.art {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 90% at 85% 10%, color-mix(in srgb, var(--hue) 70%, transparent), transparent 60%),
        radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, var(--hue2, var(--hue)) 60%, transparent), transparent 65%),
        #17151a;
}
.art::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(to right, rgba(255,255,255,0.07) 0 2px, transparent 2px 9px);
    -webkit-mask: linear-gradient(to top, #000 0 38%, transparent 38%);
    mask: linear-gradient(to top, #000 0 38%, transparent 38%);
}
.art-title {
    position: absolute;
    left: 20px; right: 20px; top: 18px;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.85;
    z-index: 1;
}
.art-name { position: absolute; left: 20px; bottom: 18px; z-index: 1; color: #fff; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; text-shadow: 0 2px 20px rgba(0,0,0,0.3); }

.play-fab {
    position: absolute;
    right: 14px; bottom: 14px;
    z-index: 2;
    width: 44px; height: 44px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: var(--gen-bg);
    color: var(--gen-text);
    border: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 6px 20px rgba(0,0,0,0.35);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity var(--t), transform var(--t);
}
.card:hover .play-fab, .play-fab:focus-visible { opacity: 1; transform: none; }

/* ---------------- Screenshot frame ---------------- */
.shot {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--chassis);
    padding: 8px;
    box-shadow: inset 0 1px 0 var(--sheen), var(--shadow-lg);
}
.shot img { border-radius: 6px; width: 100%; height: auto; }
.shot .ui-shot { display: block; border-radius: 6px; }

/* A screenshot of a plug-in as HTML (Shot.Html, site.js): the plug-in's window in a frame, scaled
   by --s to the width of the box and moved to the crop at --x, --y. Hidden until it has its mode */
.ui-shot { position: relative; display: inline-block; vertical-align: middle; max-width: 100%; overflow: hidden; }
.ui-shot:not([style*="width:"]) { width: 100%; }
.ui-shot iframe {
    position: absolute; left: 0; top: 0;
    border: 0; pointer-events: none; visibility: hidden;
    transform-origin: 0 0;
    transform: scale(var(--s, 1)) translate(calc(-1 * var(--x)), calc(-1 * var(--y)));
}
.ui-shot.ready iframe { visibility: visible; }
.ui-shot noscript img { display: block; width: 100%; height: auto; }

/* ---------------- Transport (loops and packs player) ---------------- */
.transport { display: flex; align-items: center; gap: 10px; }
.t-btn {
    width: 44px; height: 44px;
    border-radius: var(--radius);
    display: grid; place-items: center;
    background: var(--rail);
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 var(--sheen);
    color: var(--text);
    transition: border-color var(--t), transform var(--t);
}
.t-btn:hover { border-color: var(--muted); }
.t-btn:active { transform: translateY(1px); }
.t-btn .svg-icon { width: 18px; height: 18px; }
.t-play {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--hue);
    border-color: var(--hue);
    color: var(--on-color);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 0 0 6px var(--hue-dim);
}
.t-play:hover { border-color: var(--hue); filter: brightness(1.08); }
.t-play .svg-icon { width: 24px; height: 24px; }

/* Step strip: a loop drawn as plugin pattern cells */
.steps { display: grid; grid-template-columns: repeat(var(--n, 32), 1fr); gap: 3px; height: 26px; }
.steps i { border-radius: 2px; background: var(--well); box-shadow: inset 0 0 0 1px var(--line-soft); }
.steps i.on { background: var(--c, var(--hue)); box-shadow: none; }
.steps i.lo { background: color-mix(in srgb, var(--c, var(--hue)) 45%, transparent); box-shadow: none; }
.steps i:nth-child(4n+1) { margin-left: 0; }
.steps .ph { outline: 2px solid var(--text); outline-offset: 1px; }

/* Waveform drawn with bars (decorative) */
.wave { display: flex; align-items: center; gap: 2px; height: 56px; }
.wave i { flex: 1; min-width: 1px; border-radius: 1px; background: var(--hue); opacity: 0.9; }
.wave i.past { opacity: 1; }
.wave i.future { background: var(--tick); opacity: 1; }

/* ---------------- App shell: account and admin ---------------- */
.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 36px; padding-top: 40px; align-items: start; }
.side-nav { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 2px; }
.side-nav .label { padding: 18px 12px 8px; color: var(--faint); }
.side-nav .label:first-child { padding-top: 0; }
.side-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}
.side-nav a:hover { color: var(--text); background: var(--line-soft); }
.side-nav a.on, .side-nav a.active { color: var(--text); background: var(--chassis); box-shadow: inset 0 1px 0 var(--sheen), 0 0 0 1px var(--line); }
.side-nav a.on::before, .side-nav a.active::before { content: ''; position: absolute; left: -1px; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--hue); box-shadow: 0 0 8px var(--hue); }
.side-nav a .count { margin-left: auto; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.shell-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.shell-head .h2 { margin-top: 10px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.toolbar .input-search { flex: 1; min-width: 220px; max-width: 360px; }
.toolbar .select { width: auto; min-width: 150px; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--faint); }

.stat { padding: 18px 20px; }
.stat .label { display: block; margin-bottom: 10px; }
.stat-value { font-size: 30px; font-weight: 780; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.stat-delta { margin-top: 8px; font-size: 12.5px; color: var(--faint); }
.stat-delta b { color: var(--green); font-weight: 650; }

.dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; font-size: 14px; }
.dl dt { font-size: 10.5px; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); padding-top: 2px; }
.dl dd { font-weight: 550; }

/* ---------------- Docs: the manual inside the site ---------------- */
.docs { display: grid; grid-template-columns: 272px minmax(0, 1fr) 200px; gap: 48px; align-items: start; }
.docs-nav { position: sticky; top: var(--header-h); max-height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 32px 4px 40px 0; font-size: 14px; line-height: 1.35; scrollbar-width: thin; }
.docs-product {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 12px;
    margin-bottom: 18px;
    border-radius: var(--radius);
    background: var(--chassis);
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 var(--sheen);
}
.docs-product .logo-tile { width: 28px; height: 28px; padding: 3px; }
.docs-product .wordmark { font-size: 12px; letter-spacing: 0.18em; }
.docs-product .svg-icon { margin-left: auto; color: var(--faint); }
.docs-search { margin-bottom: 20px; }
.docs-search .input { height: 36px; font-size: 13.5px; }
.docs-search .input-search .svg-icon { top: 10px; }
.docs-search kbd { position: absolute; right: 8px; top: 8px; }
.btn.toc-toggle { display: none; margin-bottom: 12px; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav .sectlevel1 > li { margin-bottom: 1px; }
.docs-nav a { display: block; padding: 6px 10px; border-radius: var(--radius-sm); color: var(--muted); transition: background var(--t), color var(--t); }
.docs-nav a:hover { color: var(--text); background: var(--line-soft); }
.docs-nav .menu-list a { display: flex; padding: 8px 10px; color: var(--text); }
.docs-nav .menu-list a:hover { background: var(--rail); }
.docs-nav .sectlevel1 > li > a { font-weight: 620; color: var(--text); padding-left: calc(10px + 1.6em); text-indent: -1.6em; }
.docs-nav .sectnum { display: inline-block; text-indent: 0; min-width: 1.6em; color: var(--faint); font-variant-numeric: tabular-nums; font-weight: 550; }
.docs-nav .sectlevel2 { display: none; margin: 2px 0 8px 15px; padding-left: 10px; border-left: 1px solid var(--line); }
.docs-nav li.open > .sectlevel2 { display: block; }
.docs-nav .sectlevel2 a { font-size: 13.5px; padding: 5px 10px; }
.docs-nav .sectlevel2 .sectnum { display: none; }
.docs-nav a.active { color: var(--text); background: var(--chassis); box-shadow: inset 0 1px 0 var(--sheen), 0 0 0 1px var(--line); }
.docs-nav .sectlevel2 a.active { color: var(--amber); background: none; box-shadow: none; position: relative; }
.docs-nav .sectlevel2 a.active::before { content: ''; position: absolute; left: -11px; top: 6px; bottom: 6px; width: 2px; background: var(--amber); border-radius: 2px; }
.docs-nav .sectlevel1 > li > a.active .sectnum { color: var(--amber); }
.docs-aside { position: sticky; top: var(--header-h); padding-top: 40px; font-size: 13px; }
.docs-aside .label { display: block; margin-bottom: 12px; color: var(--faint); }
.docs-aside ul { list-style: none; margin: 0 0 28px; padding: 0; border-left: 1px solid var(--line); }
.docs-aside li a { display: block; padding: 4px 0 4px 14px; margin-left: -1px; color: var(--muted); border-left: 2px solid transparent; line-height: 1.35; }
.docs-aside li a:hover { color: var(--text); }
.docs-aside li a.active { color: var(--amber); border-left-color: var(--amber); }
.docs-aside .btn { width: 100%; display: block; text-align: left; margin-bottom: 6px; }
.docs-main { min-width: 0; padding: 32px 0 40px; }

.docs-cover {
    position: relative;
    padding: 36px 36px 0;
    margin-bottom: 48px;
    border-radius: var(--radius-lg);
    background: var(--chassis);
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 var(--sheen);
    overflow: hidden;
}
.docs-cover h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 800; letter-spacing: -0.035em; margin-top: 14px; }
.docs-cover .meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 28px; }
.docs-cover .hero { margin-bottom: -60px; border-radius: 8px 8px 0 0; box-shadow: var(--shadow-lg); width: 100%; height: auto; }
.docs-cover .ui-shot.hero { display: block; }
.docs-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; }
.docs-pager a { padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--chassis); box-shadow: inset 0 1px 0 var(--sheen); transition: border-color var(--t); }
.docs-pager a:hover { border-color: var(--amber); }
.docs-pager a .label { display: block; margin-bottom: 4px; color: var(--faint); }
.docs-pager a b { font-size: 16px; font-weight: 700; }
.docs-pager a:last-child { text-align: right; }

/* Asciidoctor's HTML5 output, as the manual is built (scoped to .manual) */
.manual { --measure: 740px; max-width: var(--measure); font-size: 16px; line-height: 1.7; color: var(--text); }
.manual p { margin: 0 0 1em; }
.manual a { color: var(--amber); font-weight: 550; }
.manual a:hover { text-decoration: underline; text-underline-offset: 3px; }
.manual strong { font-weight: 650; }
.manual .sect1 + .sect1 { margin-top: 72px; }
.manual h2 { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); position: relative; }
.manual h2 .sectnum {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.16em;
    color: var(--amber);
}
.manual h2::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 48px; height: 2px; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.manual h3 { font-size: 22px; font-weight: 750; letter-spacing: -0.02em; margin: 48px 0 14px; }
.manual h3 .sectnum { color: var(--faint); font-weight: 600; margin-right: 0.35em; font-variant-numeric: tabular-nums; }
.manual h4 { font-size: 17px; margin: 32px 0 8px; letter-spacing: -0.01em; }
.manual h5 { font-size: 15px; margin: 24px 0 6px; }
.manual a.anchor { position: absolute; margin-left: -1.1em; width: 1.1em; opacity: 0; color: var(--faint); font-weight: 500; text-decoration: none; }
.manual a.anchor::before { content: "#"; }
.manual h2 a.anchor { margin-top: 28px; }
.manual h2:hover a.anchor, .manual h3:hover a.anchor, .manual h4:hover a.anchor { opacity: 1; }
.manual .paragraph.lead p, .manual .lead > p { font-size: 19px; line-height: 1.6; color: var(--text); }
.manual .ulist ul, .manual .olist ol { margin: 0 0 1em; padding-left: 1.6em; }
.manual .ulist li, .manual .olist li { margin: 0.35em 0; }
.manual .ulist li p, .manual .olist li p { margin: 0; }
.manual .ulist ul { list-style: none; padding-left: 1.4em; }
.manual .ulist ul > li { position: relative; }
.manual .ulist ul > li::before { content: ''; position: absolute; left: -1.2em; top: 0.68em; width: 7px; height: 2px; background: var(--amber); }
.manual .olist ol > li::marker { color: var(--amber); font-weight: 700; font-variant-numeric: tabular-nums; }
.manual .dlist dl { margin: 0 0 1.2em; display: grid; gap: 4px; }
.manual .dlist dt { font-weight: 680; margin-top: 0.8em; }
.manual .dlist dd { margin: 0; color: var(--muted); }
.manual .dlist dd p { margin: 0; }
.manual code { font-family: var(--mono); font-size: 0.86em; background: var(--well); color: var(--text); padding: 0.12em 0.4em; border-radius: 4px; }
.manual kbd, kbd {
    display: inline-block;
    font: 650 0.76em/1 var(--font);
    color: var(--text);
    background: var(--chassis);
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 0.32em 0.5em 0.26em;
    vertical-align: 0.1em;
    box-shadow: inset 0 1px 0 var(--sheen);
}
.manual .keyseq { white-space: nowrap; }
.manual .range { color: var(--faint); font-size: 0.86em; font-weight: 450; margin-left: 0.35em; }
.manual .imageblock { margin: 24px 0 28px; }
.manual .imageblock img { max-width: 100%; height: auto; }
.manual .imageblock.ui img { border-radius: 8px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.manual .imageblock.ui .ui-shot { border-radius: 8px; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.manual .imageblock > .title { font-size: 13px; color: var(--faint); margin-top: 10px; }
.manual .imageblock.right { float: right; margin: 4px 0 16px 28px; max-width: 45%; }
.manual .imageblock.left { float: left; margin: 4px 28px 16px 0; max-width: 45%; }
.manual .clearfix { clear: both; }
.manual .openblock.clearfix .content:empty { display: none; }
.manual .sect2::after { content: ""; display: table; clear: both; }
.manual .colist { margin: 4px 0 28px; }
.manual .colist table { border-collapse: collapse; }
.manual .colist td { padding: 5px 0; vertical-align: top; }
.manual .colist td:first-child { width: 36px; padding-top: 6px; }
.manual .colist td:first-child b { display: none; }
.manual .colist td p { margin: 0; }
.manual i.conum {
    display: inline-flex; align-items: center; justify-content: center;
    width: 21px; height: 21px; border-radius: 50%;
    background: var(--text); color: var(--chassis);
    font: 750 11.5px/1 var(--font); font-style: normal; font-variant-numeric: tabular-nums;
}
.manual i.conum::after { content: attr(data-value); }
.manual table.tableblock { width: 100%; border-collapse: collapse; margin: 18px 0 28px; font-size: 15px; }
.manual table.tableblock th, .manual table.tableblock td { text-align: left; vertical-align: top; padding: 11px 16px 11px 0; }
.manual table.tableblock thead th { font-size: 10.5px; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.manual table.tableblock tbody td { border-bottom: 1px solid var(--line-soft); }
.manual table.tableblock p.tableblock { margin: 0; }
.manual table.tableblock td .imageblock { margin: 0; }
.manual table.tableblock td .imageblock img { border: 0; box-shadow: none; border-radius: 5px; }
.manual .admonitionblock { margin: 24px 0 28px; }
.manual .admonitionblock > table { width: 100%; border-collapse: separate; background: var(--ad-dim, var(--amber-dim)); border: 1px solid color-mix(in srgb, var(--ad, var(--amber)) 30%, transparent); border-radius: var(--radius); }
.manual .admonitionblock td { padding: 14px 18px 14px 0; vertical-align: top; }
.manual .admonitionblock td.icon { width: 52px; padding: 16px 0 0 16px; }
.manual .admonitionblock td.icon i, .manual .admonitionblock td.icon .title { display: none; }
.manual .admonitionblock td.icon::before { content: ""; display: block; width: 20px; height: 20px; background: var(--ad, var(--amber)); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.manual .admonitionblock.tip { --ad: var(--amber); --ad-dim: var(--amber-dim); --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 21h6v-1.5H9V21zm3-19a7 7 0 0 0-4 12.74V17a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2.26A7 7 0 0 0 12 2z'/%3E%3C/svg%3E"); }
.manual .admonitionblock.note { --ad: var(--cyan); --ad-dim: var(--cyan-dim); --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E"); }
.manual .admonitionblock.important, .manual .admonitionblock.warning { --ad: var(--red); --ad-dim: var(--red-dim); --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E"); }
.manual .admonitionblock td.content p:last-child { margin-bottom: 0; }
.manual .sidebarblock { margin: 28px 0 32px; }
.manual .sidebarblock > .content { background: var(--chassis); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--sheen); border-radius: var(--radius-lg); padding: 20px 24px; font-size: 15px; }
.manual .sidebarblock > .content > .title { font-weight: 720; font-size: 16px; margin-bottom: 8px; }
.manual .sidebarblock .paragraph:last-child p { margin-bottom: 0; }

/* ---------------- Home ---------------- */
/* The glow sits on the wrapper of the offers and the hero, so it starts at the top of the page either way */
.hero-zone { position: relative; overflow: hidden; }
.hero-zone > * { position: relative; }
.hero { padding: 72px 0 40px; overflow: hidden; }
.hero-zone::before {
    content: '';
    position: absolute;
    inset: -20% -10% auto auto;
    width: 900px; height: 700px;
    background: radial-gradient(closest-side, var(--amber-dim), transparent);
    pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.hero .display { margin-top: 22px; }
.hero .lead { margin-top: 22px; max-width: 520px; }
.hero .btn-row { margin-top: 32px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 32px; color: var(--faint); font-size: 13px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-visual { position: relative; }
.hero-visual .shot { transform: perspective(1800px) rotateY(-7deg) rotateX(2deg); transform-origin: left center; }
.hero-chip {
    position: absolute;
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    background: var(--chassis);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: inset 0 1px 0 var(--sheen), var(--shadow-lg);
    font-size: 12.5px;
    font-weight: 650;
}

.product-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.product-row.flip .product-copy { order: 2; }
.feature-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.feature-list li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.feature-list .ic { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; background: var(--hue-dim); color: var(--hue); }
.feature-list .ic .svg-icon { width: 15px; height: 15px; }
.feature-list b { display: block; font-weight: 680; }
.feature-list span { color: var(--muted); font-size: 14.5px; }

.band { background: var(--chassis); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--sheen); }
.spec-strip { display: grid; grid-template-columns: repeat(4, 1fr); }
.spec-strip > div { padding: 28px 24px; border-left: 1px solid var(--line-soft); }
.spec-strip > div:first-child { border-left: 0; }
.spec-strip .stat-value { font-size: 34px; color: var(--text); }
.spec-strip .label { margin-top: 10px; display: block; }

.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: #0f0e11; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.video-frame .poster { position: absolute; inset: 0; background-size: cover; background-position: center top; filter: saturate(0.9); }
.video-frame .poster::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,8,6,0.75), rgba(10,8,6,0.15) 60%); }
.video-frame .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--gen-bg); color: var(--gen-text); border: 0; box-shadow: 0 0 0 10px rgba(255, 138, 31, 0.22), 0 10px 30px rgba(0,0,0,0.4); }
.video-frame .play .svg-icon { width: 28px; height: 28px; margin-left: 4px; }
.video-frame .caption { position: absolute; left: 24px; bottom: 20px; right: 24px; color: #fff; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.video-frame .caption b { font-size: 18px; font-weight: 700; display: block; }
.video-frame .caption span { font-size: 13px; opacity: 0.75; }

.cta { position: relative; overflow: hidden; padding: 56px; border-radius: 16px; background: #17151a; color: #f3efe8; border: 1px solid rgba(255,255,255,0.08); }
.cta::before { content: ''; position: absolute; inset: auto -10% -60% 40%; height: 140%; background: radial-gradient(closest-side, rgba(255,138,31,0.35), transparent); }
.cta > * { position: relative; }
.cta .lead { color: #a49c91; }
.cta .btn:not(.btn-primary) { background: #2a272e; color: #f3efe8; border-color: rgba(255,255,255,0.1); box-shadow: inset 0 1px 0 rgba(255,255,255,0.07); }

/* ---------------- Product page ---------------- */
.buy-box { position: sticky; top: calc(var(--header-h) + 24px); }
.price { display: flex; align-items: baseline; gap: 10px; }
.price b { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.price s { color: var(--faint); font-size: 18px; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 14px; color: var(--muted); }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list .svg-icon { color: var(--green); margin-top: 3px; width: 14px; height: 14px; }
.os-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------------- Kit creator ---------------- */
.pads { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.pad { display: flex; flex-direction: column; gap: 10px; }
.pad-face {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    background: var(--well);
    border: 1px dashed var(--line);
    display: grid; place-items: center;
    cursor: pointer;
    transition: border-color var(--t), transform var(--t);
    overflow: hidden;
}
.pad-face:hover { border-color: var(--muted); }
.pad.filled .pad-face {
    border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
    background:
        linear-gradient(to top, color-mix(in srgb, var(--c) 30%, transparent), color-mix(in srgb, var(--c) 10%, transparent)),
        var(--well);
    box-shadow: inset 0 1px 0 var(--sheen);
}
.pad-face .abbr { font-size: 22px; font-weight: 800; letter-spacing: 0.02em; color: var(--faint); }
.pad.filled .abbr { color: var(--c); }
.pad-face .mini-wave { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 18px; display: flex; align-items: center; gap: 1px; }
/* Admin license drawer */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 70; background: var(--chassis); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform 0.22s ease; }
.drawer.open { transform: none; }
.drawer-form { display: flex; flex-direction: column; height: 100%; }
.drawer-body { padding: 20px; overflow-y: auto; flex: 1; }
.drawer-info { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 12px 0 0; font-size: 13px; }
.drawer-info dt { color: var(--faint); }
.drawer-info dd { margin: 0; }
.scrim { position: fixed; inset: 0; z-index: 65; background: rgba(10, 8, 6, 0.5); display: none; }
.scrim.open { display: block; }
.table tbody tr[data-drawer-url], .table tbody tr[data-href] { cursor: pointer; }
.key-box { display: flex; align-items: center; gap: 18px; padding: 18px 20px; margin-bottom: 20px; border: 1px solid color-mix(in srgb, var(--green) 45%, var(--line)); border-radius: var(--radius-lg); background: linear-gradient(90deg, var(--green-dim), transparent 70%), var(--chassis); box-shadow: inset 0 1px 0 var(--sheen); }
.key-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--green-dim); color: var(--green); }
.key-icon .svg-icon { width: 22px; height: 22px; }
.key-main { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.key-value { font-family: var(--mono, ui-monospace, monospace); font-size: 22px; font-weight: 700; letter-spacing: 0.08em; color: var(--text); word-break: break-all; }

/* Admin loops table */
.switch-row { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.loops-admin th.narrow, .loops-admin td.narrow { width: 1%; white-space: nowrap; }
.loops-admin th.narrow { text-align: right; }
.loops-admin td.num { text-align: right; }
.sort-link { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; }
.sort-link .svg-icon { width: 13px; height: 13px; color: var(--faint); }
.sort-link.on, .sort-link.on .svg-icon { color: var(--text); }
.folder-toggle { display: inline-flex; color: var(--muted); }
#toggle-all.open .svg-icon { transform: rotate(90deg); }
.audio-cell { display: flex; align-items: center; gap: 8px; }
.audio-cell .loop-wave { flex: 1; min-width: 160px; }
.name-form .input { flex: 1; }
.segmented > label { cursor: pointer; }
.segmented > label > input { position: absolute; opacity: 0; pointer-events: none; }
.product-thumb { display: block; max-width: 240px; border-radius: var(--radius-sm); border: 1px solid var(--line); margin-bottom: 10px; }

.kit-dots { display: flex; gap: 3px; }
.kit-dots i { width: 8px; height: 8px; border-radius: 2px; background: var(--well); box-shadow: inset 0 0 0 1px var(--line-soft); }
.kit-dots i.on { background: var(--c); box-shadow: none; }
.pad-face .mini-wave i { flex: 1; background: var(--c); opacity: 0.6; border-radius: 1px; }
.pad.playing .pad-face .mini-wave i { opacity: 0.3; }
.pad.playing .pad-face .mini-wave i.on { opacity: 1; }
.pad-face .lock { position: absolute; top: 8px; right: 8px; color: var(--red); }
.pad-face .num { position: absolute; top: 7px; left: 9px; font-size: 10px; font-weight: 750; color: var(--faint); letter-spacing: 0.08em; }
.pad-face .abbr .svg-icon { width: 28px; height: 28px; color: var(--f-toms); }
.pad.drop .pad-face { border: 2px solid var(--f-toms); background: var(--f-toms-dim); transform: scale(1.02); }
.pad .input { height: 32px; font-size: 12.5px; padding: 0 9px; }
.pad.locked .input { opacity: 0.6; }

/* ---------------- Auth ---------------- */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--header-h)); }
.auth-form { display: grid; place-items: center; padding: 48px var(--gutter); }
.auth-form > div { width: 100%; max-width: 380px; }
.auth-art { position: relative; overflow: hidden; background: var(--bg); color: var(--text); display: flex; flex-direction: column; justify-content: flex-end; padding: 56px; }
.auth-art::before { content: ''; position: absolute; inset: 0; background: radial-gradient(80% 60% at 70% 30%, rgba(255,138,31,0.28), transparent 70%), radial-gradient(60% 50% at 10% 90%, rgba(47,211,211,0.15), transparent 70%); }
.auth-art img, .auth-art .ui-shot { position: absolute; top: 56px; left: 56px; width: 120%; height: auto; max-width: none; border-radius: 10px; box-shadow: var(--shadow-lg); opacity: 0.9; }
.auth-art::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, var(--bg) 0, var(--bg) 34%, color-mix(in srgb, var(--bg) 85%, transparent) 50%, color-mix(in srgb, var(--bg) 0%, transparent) 75%); }
.auth-art > div { position: relative; z-index: 2; }
.auth-art .lead { color: var(--muted); }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; margin: 20px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }


/* ==========================================================================
   Site pages
   ========================================================================== */

/* ---------------- Prose: help, privacy, descriptions written in Markdown ---------------- */
.prose { max-width: 740px; font-size: 16px; line-height: 1.7; }
.prose > * + * { margin-top: 1em; }
.prose h1 { font-size: clamp(30px, 4vw, 40px); font-weight: 800; letter-spacing: -0.03em; }
.prose h2 { font-size: 24px; font-weight: 760; margin-top: 2em; }
.prose h3 { font-size: 19px; font-weight: 720; margin-top: 1.6em; }
.prose h4, .prose h5 { font-size: 16px; font-weight: 700; margin-top: 1.4em; }
.prose a { color: var(--hue); font-weight: 550; }
.prose a:hover { text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.35em; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.prose th { text-align: left; font-size: 10.5px; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); padding: 8px 12px 8px 0; }
.prose td { border-bottom: 1px solid var(--line-soft); padding: 9px 12px 9px 0; vertical-align: top; }
.prose code { font-family: var(--mono); font-size: 0.88em; background: var(--well); padding: 0.1em 0.4em; border-radius: 4px; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2em 0; }

/* ---------------- Toast ---------------- */
.toast-host { position: fixed; left: 50%; top: calc(var(--header-h) + 12px); transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; min-width: 260px; max-width: min(520px, calc(100vw - 32px)); animation: toast-in 0.18s ease; box-shadow: var(--shadow-lg); background: var(--chassis); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } }

/* ---------------- Dialog ---------------- */
dialog.dialog { padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--chassis); color: var(--text); box-shadow: inset 0 1px 0 var(--sheen), var(--shadow-lg); width: min(92vw, 420px); }
dialog.dialog::backdrop { background: rgba(10, 8, 6, 0.55); }
dialog.dialog .panel-body { font-size: 15px; }

/* ---------------- Status message ---------------- */
.status-message { margin-bottom: 20px; }

/* ---------------- Volume: a range input drawn as a plugin meter ---------------- */
.vol { display: flex; align-items: center; gap: 10px; color: var(--muted); width: 180px; }
.range-meter {
    -webkit-appearance: none; appearance: none;
    flex: 1; min-width: 0;
    height: 26px; margin: 0;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background:
        repeating-linear-gradient(to right, transparent 0 calc(12.5% - 1px), var(--tick) calc(12.5% - 1px) 12.5%),
        linear-gradient(to right, var(--hue-dim) 0 var(--value, 50%), transparent var(--value, 50%)),
        var(--well);
    cursor: pointer;
}
.range-meter:hover { border-color: var(--muted); }
.range-meter::-webkit-slider-thumb { -webkit-appearance: none; width: 2px; height: 24px; background: var(--hue); border: 0; }
.range-meter::-moz-range-thumb { width: 2px; height: 24px; background: var(--hue); border: 0; border-radius: 0; }
.range-meter::-moz-range-track { background: transparent; }

/* ---------------- Waveforms (audio.js): the player's box, before its waveform is drawn ---------------- */
.wave-box { position: relative; min-height: var(--h, 64px); cursor: pointer; }
.wave-box:not(.wave-ready)::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; border-radius: 1px; background: var(--tick); }
.wave-box.wave-failed::before { background: repeating-linear-gradient(to right, var(--tick) 0 6px, transparent 6px 12px); }

/* ---------------- Players: play and pause share a place ---------------- */
.loops-ctrl:not(.playing) .when-playing, .loops-ctrl.playing .when-paused,
.loop-ctrl:not(.playing) .loop-pause, .loop-ctrl.playing .loop-play { display: none; }
.t-btn.disabled, .t-btn[disabled] { opacity: 0.35; pointer-events: none; }

/* Loops deck */
.deck { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
.deck-main { padding: 28px; }
.deck-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.deck-title { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; margin-top: 8px; min-height: 1.2em; }
.deck-wave { margin: 28px 0 0; }
.loop-wave { min-width: 0; }
.deck-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; flex-wrap: wrap; }
.credits { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.credits-value { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; color: var(--cyan); font-variant-numeric: tabular-nums; line-height: 1; }
.loop-list:empty { display: none; }
.loop-row { display: grid; grid-template-columns: 36px minmax(0, 200px) minmax(0, 1fr); gap: 16px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); }
/* A single loop's progress: a dim track that lights up while the loop plays */
.cart-wave-col { width: 40%; min-width: 180px; }
.pack-wave { flex: 1; min-width: 0; }
.contents { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 24px; }
.contents > .panel { padding: 14px 16px; }
.contents .stat-value { font-size: 24px; margin-bottom: 6px; }
.loop-row:last-child { border-bottom: 0; }
.loop-row:hover { background: var(--line-soft); }
.loop-row b { font-weight: 650; font-size: 14px; }
.play-sm { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--rail); border: 1px solid var(--line); color: var(--hue); cursor: pointer; }
.play-sm:hover { border-color: var(--muted); }
.play-sm.loop-pause { background: var(--hue); color: var(--on-color); border-color: var(--hue); }
.play-sm .svg-icon { width: 13px; height: 13px; }
.filters { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 40px 0 16px; }

/* ---------------- Product ---------------- */
.product-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
.product-media { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--chassis); box-shadow: var(--shadow-lg); }
.product-media img { width: 100%; height: auto; }
.product-media .ui-shot { display: block; }
.sw-card .card-media { aspect-ratio: 16 / 10; background: var(--rail); border-bottom: 1px solid var(--line-soft); }
.sw-card .card-media img { object-fit: cover; object-position: top; }
.sw-card .card-body { padding: 24px; gap: 12px; }
.sw-card .card-foot { border-top: 1px solid var(--line-soft); padding: 16px 24px; margin: 8px -24px -24px; }
/* The whole card is a link: the title's link covers it, and the buttons stay above it */
.sw-card { position: relative; }
.card-link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.sw-card .btn-row, .sw-card .card-foot { position: relative; z-index: 2; }
/* A bundle without a picture of its own: its plug-ins' screenshots side by side */
.bundle-shots { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 16px; align-items: center; height: 100%; padding: 24px; background: var(--rail); }
.bundle-shots > * { overflow: hidden; min-width: 0; border-radius: 6px; border: 1px solid var(--line); box-shadow: 0 8px 24px rgb(0 0 0 / 0.18); }
.bundle-shots img { display: block; width: 100%; height: auto; }

/* ---------------- Packs ---------------- */
.pack-hero { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 48px; align-items: start; padding-top: 40px; }
.pack-cover { position: relative; aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--well); }
.pack-cover img { width: 100%; height: 100%; object-fit: cover; }
.player { padding: 22px; margin-top: 28px; }
.player-row { display: flex; align-items: center; gap: 18px; }

/* ---------------- Videos ---------------- */
.stage { margin-top: 48px; }
.stage-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.stage-num { width: 44px; height: 44px; flex: none; border-radius: var(--radius); display: grid; place-items: center; background: var(--hue); color: var(--on-color); font-weight: 800; font-size: 18px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.3); }
.stage.locked .stage-num { background: var(--well); color: var(--faint); box-shadow: inset 0 0 0 1px var(--line); }
.stage-head .line { flex: 1; height: 1px; background: var(--line-soft); }
.video-item { border-bottom: 1px solid var(--line-soft); }
.video-item:last-child { border-bottom: 0; }
.video-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 14px 18px; font-weight: 650; }
.video-item summary::-webkit-details-marker { display: none; }
.video-item summary:hover { background: var(--line-soft); }
.video-item summary .chev { margin-left: auto; color: var(--faint); transition: transform var(--t); }
.video-item[open] summary .chev { transform: rotate(180deg); }
.video-item[open] summary .play-sm { background: var(--hue); color: var(--on-color); border-color: var(--hue); }
.video-item .video-wrap { padding: 0 18px 18px; }
.video-item video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #0f0e11; border-radius: var(--radius); }

/* ---------------- Help ---------------- */
.topic { padding: 22px; }
.topic .ic { width: 40px; height: 40px; border-radius: var(--radius); display: grid; place-items: center; background: var(--hue-dim); color: var(--hue); margin-bottom: 16px; }
.topic b { font-size: 16px; font-weight: 700; display: block; }
.topic span { color: var(--muted); font-size: 14px; }

/* ---------------- Account ---------------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: var(--radius); background: var(--well); border: 1px solid var(--line); }
.plan .stat-value { color: var(--cyan); }
.plan form { margin-top: auto; padding-top: 14px; }
.lic-head { display: flex; align-items: center; gap: 16px; padding: 20px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.lic-head .logo-tile { width: 44px; height: 44px; padding: 6px; }
.lic-head .grow { flex: 1; min-width: 200px; }
.lic-meta { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line-soft); }
.lic-meta > div { padding: 16px 20px; border-left: 1px solid var(--line-soft); }
.lic-meta > div:first-child { border-left: 0; }
.lic-meta .label { display: block; margin-bottom: 6px; color: var(--faint); }
.lic-meta b { font-weight: 650; }

/* ---------------- Kit creator ---------------- */
.dropzone .dz-message, .dropzone .dz-preview { display: none !important; }
.upload-progress { width: 120px; height: 6px; border-radius: 3px; background: var(--well); overflow: hidden; }
.upload-progress i { display: block; height: 100%; width: 0; background: var(--f-toms); }
#dropzoneUpload:not(.dz-started) .upload-progress { display: none; }
.kit-name { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.03em; background: none; border: 0; border-bottom: 1px dashed var(--line); padding: 0 0 4px; width: min(100%, 520px); outline: none; color: var(--text); }
.kit-name:focus { border-bottom-color: var(--f-toms); }
.pad form.dropzone { display: block; }
.pad-foot { display: flex; gap: 6px; align-items: center; }
.pad-foot form.grow { flex: 1; min-width: 0; }
.pad-foot .input { width: 100%; height: 32px; font-size: 12.5px; padding: 0 9px; }
.pad-foot .locked-name { flex: 1; min-width: 0; height: 32px; display: flex; align-items: center; padding: 0 9px; font-size: 12.5px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lock-toggle { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--rail); color: var(--faint); cursor: pointer; }
.lock-toggle:hover { border-color: var(--muted); }
.play-toggle { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--rail); color: var(--faint); cursor: pointer; }
.play-toggle:hover { border-color: var(--muted); color: var(--c, var(--text)); }
.play-toggle .svg-icon { width: 14px; height: 14px; }
.play-toggle.playing { color: var(--c); border-color: var(--c); }
.sample-wrapper.empty .pad-foot form.grow, .sample-wrapper.empty .play-toggle { visibility: hidden; }
.lock-toggle .svg-icon { width: 14px; height: 14px; }
.sample-wrapper.locked .lock-toggle { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.sample-wrapper.locked .unlocked, .sample-wrapper:not(.locked) .locked { display: none !important; }
.sample-wrapper.locked .pad-face { cursor: no-drop; }
.sample-wrapper.empty .lock-toggle, .sample-wrapper.empty .locked-name { visibility: hidden; }
.sample-wrapper:not(.empty) .pad-face {
    border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
    background: linear-gradient(to top, color-mix(in srgb, var(--c) 30%, transparent), color-mix(in srgb, var(--c) 10%, transparent)), var(--well);
    box-shadow: inset 0 1px 0 var(--sheen);
}
.sample-wrapper:not(.empty) .abbr { color: var(--c); }
.dz-drag-hover .pad-face { border: 2px solid var(--f-toms) !important; background: var(--f-toms-dim) !important; }

/* ---------------- Loops admin ---------------- */
#loopfolder-table tbody a.close-folder, #loopfolder-table tbody tr.loop { display: none; }
#loopfolder-table tbody.open a.open-folder { display: none; }
#loopfolder-table tbody.open a.close-folder { display: inline; }
#loopfolder-table tbody.open tr.loop { display: table-row; }
#loopfolder-table tbody tr.loop td { background: var(--line-soft); }

/* ==========================================================================
   Form fields by their common class names

   The admin forms, and the pages of ASP.NET Core Identity (email, password,
   two-factor) that come from its package and can't be edited here, use the
   usual field class names. They are drawn as this site's fields.
   ========================================================================== */
.form-group, .form-floating, .mb-3 { margin-bottom: 16px; }
.form-group > label, .control-label, .form-label, .form-floating > label {
    display: block;
    margin-bottom: 7px;
    font-size: 10.5px; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.form-floating { display: flex; flex-direction: column; }
.form-floating > label { order: -1; }
.form-control, .form-select {
    display: block;
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    background: var(--well);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-weight: 550;
    outline: none;
    transition: border-color var(--t), box-shadow var(--t);
}
textarea.form-control, textarea.input { padding: 10px 12px; line-height: 1.55; min-height: 96px; height: auto; resize: vertical; }
.form-control:hover, .form-select:hover { border-color: var(--muted); }
.form-control:focus, .form-select:focus { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-dim); }
.form-control:disabled, .input:disabled { opacity: 0.6; }
.form-control::placeholder { color: var(--faint); }
.form-select {
    -webkit-appearance: none; appearance: none;
    padding-right: 34px;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: right 16px top 17px, right 11px top 17px;
    background-size: 5px 5px;
    background-repeat: no-repeat;
}
input[type="file"] { font-size: 13.5px; color: var(--muted); }
input[type="file"]::file-selector-button { margin-right: 12px; height: 32px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--rail); color: var(--text); font: 750 10.5px/1 var(--font); letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }
.form-text, small.text-muted { display: block; margin-top: 6px; font-size: 12.5px; color: var(--faint); line-height: 1.5; }
.form-check, .checkbox label { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; font-size: 14px; font-weight: 550; }
.checkbox label { margin: 0 0 16px; text-transform: none; letter-spacing: 0; color: var(--text); }
.form-check-input, .checkbox input[type="checkbox"], .check-input {
    -webkit-appearance: none; appearance: none; margin: 0; flex: none;
    width: 18px; height: 18px; border-radius: 4px;
    background: var(--well); border: 1px solid var(--line);
    display: inline-grid; place-items: center; cursor: pointer;
    vertical-align: middle;
}
.form-check-input::after, .checkbox input[type="checkbox"]::after, .check-input::after { content: ''; width: 9px; height: 5px; border-left: 2px solid var(--on-color); border-bottom: 2px solid var(--on-color); transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.form-check-input:checked, .checkbox input[type="checkbox"]:checked, .check-input:checked { background: var(--amber); border-color: var(--amber); }
.form-check-input:checked::after, .checkbox input[type="checkbox"]:checked::after, .check-input:checked::after { opacity: 1; }
.form-check-label { font-size: 14px; font-weight: 550; }
.input-group { display: flex; align-items: stretch; }
.input-group > .form-control, .input-group > .input { flex: 1; min-width: 0; }
.input-group > :not(:first-child) { margin-left: -1px; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > :not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .btn { height: auto; min-height: 40px; }
.input-group-text { display: flex; align-items: center; padding: 0 12px; background: var(--rail); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); font-weight: 650; }
.text-danger, .field-validation-error { color: var(--red); font-size: 12.5px; font-weight: 600; }
span.text-danger, .field-validation-error { display: block; margin-top: 6px; }
span.text-danger:empty, .field-validation-valid { display: none; }
.validation-summary-errors ul { margin: 0 0 16px; padding: 12px 14px 12px 32px; border-radius: var(--radius); background: var(--red-dim); border: 1px solid color-mix(in srgb, var(--red) 35%, transparent); }
.validation-summary-valid { display: none; }
.input-validation-error, .is-invalid { border-color: var(--red) !important; }
.text-muted { color: var(--faint); }
.text-success { color: var(--green); }
.w-100 { width: 100%; }
.alert-success { --al: var(--green); --al-dim: var(--green-dim); }
.alert-danger { --al: var(--red); --al-dim: var(--red-dim); }
.alert-info { --al: var(--cyan); --al-dim: var(--cyan-dim); }
.alert-warning { --al: var(--amber); --al-dim: var(--amber-dim); }
.btn-success { color: var(--green); }
.btn-outline-danger { color: var(--red); }
.btn-outline-danger:hover { border-color: var(--red); }
.btn-link { background: transparent; border-color: transparent; box-shadow: none; color: var(--amber); }
.btn-link:hover { border-color: transparent; text-decoration: underline; }
.row { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.row > [class*="col-"] { flex: 1 1 280px; min-width: 0; }
.row > .col-md-4, .row > .col-md-6 { max-width: 560px; }
.d-inline, .d-inline-block { display: inline-block; }
.manage-body > h3, .manage-body > h4, .manage-body > h5 { font-size: 19px; font-weight: 720; letter-spacing: -0.012em; margin: 0 0 16px; }
.manage-body > h3 + hr, .manage-body > h4 + hr { display: none; }
.manage-body p { margin-bottom: 12px; color: var(--muted); }
.manage-body .btn + .btn, .manage-body .btn + form { margin-left: 6px; }
.manage-body ol.list { padding-left: 1.2em; }
.manage-body ol.list > li { margin-bottom: 16px; }
.manage-body #qrCode { background: #fff; padding: 10px; display: inline-block; border-radius: var(--radius); }

/* ---------------- Small caps: centred on the capitals ----------------
   Inter's line box puts capitals about a pixel above its middle, and in a flex box the text
   cannot be trimmed. So the caps labels are laid out as blocks whose text box is trimmed to
   the capitals (text-box), centred with align-content, and their icons and dots are centred
   on the capitals: their middle at half the cap height (0.3635em) above the baseline. */
.btn, .status, .tag, .segmented > *, .tabs a, .tabs button, .nav > a, .nav > .menu > button, .eyebrow {
    display: inline-block;
    align-content: center;
    text-align: center;
    line-height: 1;
    text-box: trim-both cap alphabetic;
}
.btn-block { display: block; }
.btn .svg-icon, .status .svg-icon, .tag .svg-icon, .segmented .svg-icon, .tabs .svg-icon, .nav .svg-icon {
    display: inline-block;
    width: 16px; height: 16px;
    vertical-align: calc(0.3635em - 8px);
    margin-inline: 3px;
}
.btn-icon .svg-icon { margin-inline: 0; }
.btn:has(> .svg-icon:first-child):not(.btn-icon) { padding-inline: 13px 16px; }
.btn:has(> .avatar) { display: inline-grid; place-items: center; text-box: none; }
.eyebrow::before { display: inline-block; vertical-align: calc(0.3635em - 3.5px); margin-right: 9px; }
.status::before { display: inline-block; vertical-align: calc(0.3635em - 3px); margin-right: 7px; }
.status.plain .svg-icon { width: 13px; height: 13px; vertical-align: calc(0.3635em - 6.5px); margin: 0; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1180px) {
    .docs { grid-template-columns: 256px minmax(0, 1fr); }
    .docs-aside { display: none; }
}
@media (max-width: 1020px) {
    .deck, .product-layout, .pack-hero { grid-template-columns: minmax(0, 1fr); }
    .buy-box { position: static; }
    .plans { grid-template-columns: minmax(0, 1fr); }
    .hero-grid, .product-row { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .product-row.flip .product-copy { order: 0; }
    .hero-visual .shot { transform: none; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pads { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .shell { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .side-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
    .side-nav .label { display: none; }
    .side-nav a { white-space: nowrap; }
    .side-nav a.on::before, .side-nav a.active::before { display: none; }
    .docs { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .docs-nav { position: static; max-height: none; padding: 20px 0 0; }
    .btn.toc-toggle { display: block; }
    .docs-nav .toc-list { display: none; }
    .docs-nav.open .toc-list { display: block; }
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth-art { display: none; }
    .spec-strip { grid-template-columns: 1fr 1fr; }
    .spec-strip > div:nth-child(3) { border-left: 0; }
    .spec-strip > div:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 860px) {
    .nav { display: none; }
    .btn.nav-toggle { display: inline-block; }
    .site-header.open .nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: var(--header-h);
        left: 0; right: 0;
        height: auto;
        padding: 8px var(--gutter) 16px;
        background: var(--chassis);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-lg);
    }
    .site-header.open .nav > a, .site-header.open .nav > .menu > button { height: 44px; padding: 0 4px; }
    .site-header.open .nav > a.on::after { left: -16px; right: auto; top: 12px; bottom: 12px; width: 2px; height: auto; }
    .header-end .hide-sm { display: none; }
}
@media (max-width: 640px) {
    :root { --gutter: 16px; }
    .lic-meta { grid-template-columns: 1fr 1fr; }
    .lic-meta > div:nth-child(3) { border-left: 0; }
    .lic-meta > div:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
    .deck-main { padding: 20px; }
    .loop-row { grid-template-columns: 36px minmax(0, 1fr) 90px; gap: 12px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .pads { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-base { flex-direction: column; align-items: flex-start; }
    .section { padding: 52px 0; }
    .cta { padding: 32px 24px; }
    .page-head { padding: 32px 0 20px; }
    .docs-cover { padding: 24px 20px 0; }
    .docs-cover .hero { margin-bottom: -30px; }
    .docs-pager { grid-template-columns: 1fr; }
    .manual h2 { font-size: 28px; }
    .manual .imageblock.right, .manual .imageblock.left { float: none; margin: 16px 0; max-width: 100%; }
    .manual table.tableblock.controls, .manual table.tableblock.controls tbody, .manual table.tableblock.controls tr, .manual table.tableblock.controls td { display: block; width: 100% !important; }
    .manual table.tableblock.controls colgroup { display: none; }
    .manual table.tableblock.controls td { border-bottom: 0; padding-bottom: 0; }
    .manual table.tableblock.controls tr { border-bottom: 1px solid var(--line-soft); padding-bottom: 12px; }
    .hero-chip { display: none; }
    .wave { gap: 1px; }
    .wave i:nth-child(2n) { display: none; }
    .panel-pad { padding: 18px; }
    .table-cards thead { display: none; }
    .table-cards tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 4px; border-bottom: 1px solid var(--line-soft); }
    .table-cards td { border: 0; padding: 4px 12px; }
}

/* The theme switch shows the sun in light mode, the moon in dark */
[data-theme-toggle] .i-moon { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .i-sun { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .i-moon { display: inline-block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) [data-theme-toggle] .i-sun { display: none; }
    :root:not([data-theme="light"]) [data-theme-toggle] .i-moon { display: inline-block; }
}
.menu-list form { margin: 0; }

/* The title of an account page: the pages of the Identity package start with an h3 or h4 */
.page-title, .manage-body > h3:first-of-type, .manage-body:not(:has(> h3)) > h4:first-of-type {
    font-size: clamp(26px, 3vw, 34px); font-weight: 780; letter-spacing: -0.025em; line-height: 1.15; margin: 0 0 24px;
}
.manage-body > .row { max-width: 760px; }

/* Identity pages without a layout of their own (forgot password, confirmations, two-factor):
   a narrow column */
.identity:not(:has(> .wrap, > .auth)) { max-width: calc(640px + 2 * var(--gutter)); margin: 0 auto; padding: 48px var(--gutter) 0; }
.identity > h1 { font-size: clamp(30px, 4vw, 40px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 16px; }
.identity > h2, .identity > h3 { font-size: 19px; font-weight: 720; margin: 24px 0 12px; }
.identity > p, .identity > div > p { color: var(--muted); margin-bottom: 12px; }
.identity > hr, .identity h2 + hr, .identity h4 + hr { display: none; }
.identity:not(:has(> .wrap, > .auth)) a:not(.btn) { color: var(--amber); font-weight: 550; }

/* Admin: inline filter forms, pages, marked rows */
.form-inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 16px 16px 0; }
.form-inline .form-control { width: auto; }
.form-inline .form-check-label { margin-right: 8px; }
.pagination { display: flex; gap: 4px; list-style: none; padding: 0; margin: 20px 0 0; }
.page-link { display: inline-block; align-content: center; height: 30px; padding: 0 11px; border-radius: var(--radius-sm); background: var(--rail); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--sheen); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.page-link:hover { border-color: var(--muted); }
.page-item.active .page-link { background: var(--amber); border-color: var(--amber); color: var(--on-color); }
.page-item.disabled .page-link { opacity: 0.4; pointer-events: none; }
.table tr.faint td { color: var(--faint); }
.table tr.row-bad td { background: var(--red-dim); }
#loopfolder-table tbody tr:last-child td { border-bottom: 1px solid var(--line-soft); }
.shell-head + .alert, .shell-head + form { margin-bottom: 20px; }
.alert:has(> h4) { flex-direction: column; align-items: stretch; gap: 8px; }

/* Identity's confirmed-email field: the field and its tick side by side, the label above */
.form-floating.input-group { flex-direction: row; flex-wrap: wrap; }
.form-floating.input-group > label { width: 100%; }
.form-floating.input-group > .form-control { flex: 1; width: auto; }
.form-floating.input-group > .input-group-append { display: flex; margin-left: -1px; }
.form-floating.input-group > .input-group-append .input-group-text { border-top-left-radius: 0; border-bottom-left-radius: 0; color: var(--green); }
.form-floating.input-group > .form-control:has(+ .input-group-append) { border-top-right-radius: 0; border-bottom-right-radius: 0; }

/* Admin tables: one line per cell, the table scrolls when it's wider than the page */
.shell .table th, .shell .table td { white-space: nowrap; }
.shell .table td { padding-top: 10px; padding-bottom: 10px; }
.shell form.mb-3 { margin-bottom: 20px; }

/* ---------------- Product descriptions (Markdown with ::: blocks) ----------------
   ::: video          an embedded player, 16:9
   :::: features      cards in two columns, each a ::: block with an image, ### and text
   ::: whats-new      ### per month, a list of changes
   ::: callout        a note set apart in the area's hue */
.prose .lead, .prose p.lead { font-size: 19px; line-height: 1.6; color: var(--text); }
.prose .video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: #0f0e11; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.prose .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose .features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.prose .features > div { margin: 0; padding: 0; overflow: hidden; background: var(--chassis); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 0 1px 0 var(--sheen); }
.prose .features > div > * { margin: 0; padding: 0 18px; }
.prose .features > div > p:first-child { padding: 0; background: var(--chassis); border-bottom: 1px solid var(--line-soft); }
.prose .features > div > p:first-child img { display: block; width: 100%; height: 150px; padding: 14px 16px; object-fit: contain; border: 0; border-radius: 0; }
/* A shot fits the same band: as wide as it can be at 122px high (--ar is its width over its height) */
.prose .features > div > p:first-child:has(.ui-shot) { display: flex; align-items: center; justify-content: center; height: 150px; padding: 14px 16px; }
.prose .features > div > p:first-child .ui-shot { max-width: min(100%, calc(122px * var(--ar))); }
.prose .features h3 { margin: 16px 0 6px; font-size: 16.5px; }
.prose .features h3 + p { padding-bottom: 18px; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.prose .whats-new { padding: 4px 24px 8px; border-left: 2px solid var(--hue); }
.prose .whats-new h3 { display: flex; align-items: center; gap: 9px; margin: 22px 0 10px; font-size: 11px; font-weight: 750; letter-spacing: 0.16em; text-transform: uppercase; color: var(--hue); }
.prose .whats-new h3::before { content: ''; width: 9px; height: 9px; margin-left: -30px; margin-right: 12px; border-radius: 50%; background: var(--hue); box-shadow: 0 0 0 4px var(--bg), 0 0 10px var(--hue); }
.prose .whats-new ul { list-style: none; padding: 0; margin: 0; }
.prose .whats-new li { position: relative; padding-left: 18px; font-size: 15px; }
.prose .whats-new li::before { content: ''; position: absolute; left: 0; top: 0.72em; width: 7px; height: 2px; background: var(--hue); }
.prose .whats-new li + li { margin-top: 8px; }
.prose .callout { padding: 18px 22px; border-radius: var(--radius-lg); background: var(--hue-dim); border: 1px solid color-mix(in srgb, var(--hue) 35%, transparent); }
.prose .callout > :first-child { margin-top: 0; }
.prose .callout h3 { margin-top: 0; }
@media (max-width: 640px) {
    .prose .features { grid-template-columns: minmax(0, 1fr); }
    .prose .whats-new { padding-left: 18px; }
    .prose .whats-new h3::before { margin-left: -24px; }
}

/* ---------------- Videos: the player and the video cards ---------------- */
.featured { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.video-frame > iframe, .video-frame > video, .video-frame > #player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #0f0e11; }
.now-playing { display: flex; align-items: baseline; gap: 12px; margin-top: 14px; }
.now-playing b { font-size: 17px; font-weight: 700; }
button.card { width: 100%; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.card:hover { border-color: color-mix(in srgb, var(--hue) 55%, var(--line)); transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--sheen), var(--shadow); }
button.card[disabled] { cursor: default; }
button.card[disabled]:hover { transform: none; border-color: var(--line); box-shadow: inset 0 1px 0 var(--sheen); }
.vid .card-media { display: block; aspect-ratio: 16 / 9; }
.vid .card-media img, .vid .card-media video.thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; background: #0f0e11; }
.vid .card-body { display: flex; flex-direction: column; gap: 8px; }
.vid .card-body b { font-size: 14.5px; font-weight: 680; }
.vid-art { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); background: radial-gradient(120% 90% at 85% 10%, var(--hue-dim), transparent 60%), var(--well); }
.vid-art .svg-icon { width: 28px; height: 28px; }
.vid .play-fab { right: auto; left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -40%); }
.vid:hover .play-fab, .vid.playing .play-fab { opacity: 1; transform: translate(-50%, -50%); }
.vid.playing { border-color: var(--hue); }
.vid .dur { position: absolute; right: 10px; bottom: 10px; z-index: 1; background: rgba(15, 14, 17, 0.8); color: #f3efe8; box-shadow: none; }
.vid-progress { position: relative; display: block; height: 4px; border-radius: 2px; background: var(--well); overflow: hidden; }
.vid-progress i { position: absolute; inset: 0 auto 0 0; background: var(--hue); }
.lock-over { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; color: var(--faint); }
.stage.locked .card-media img, .stage.locked .vid-art { filter: grayscale(1) blur(2px); opacity: 0.4; }
@media (max-width: 1020px) { .featured { grid-template-columns: minmax(0, 1fr); } }

/* Filter boxes with a clear button */
.input-search.input-clear-wrap { flex: none; min-width: 0; max-width: none; display: inline-block; }
.input-clear-wrap .input { padding-left: 12px; }
.input-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: var(--faint); font-size: 18px; line-height: 1; cursor: pointer; }
.input-clear:hover { background: var(--line-soft); color: var(--text); }
.input-clear[hidden] { display: none; }
.input-search .input:has(~ .input-clear:not([hidden])) { padding-right: 34px; }
.cell-trunc { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-trunc > * { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.key-warn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--amber); }
.key-warn .svg-icon { width: 15px; height: 15px; }

/* Account: credit packs and two-column forms */
.packs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.credit-pack { position: relative; padding: 18px; border-radius: var(--radius); background: var(--well); border: 1px solid var(--line); cursor: pointer; transition: border-color var(--t); text-align: left; display: block; }
.credit-pack:hover { border-color: var(--muted); }
.credit-pack.on { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-dim); background: var(--chassis); }
.credit-pack .stat-value { color: var(--cyan); }
.credit-pack .best { position: absolute; top: -10px; right: 12px; }
.credit-pack input { position: absolute; opacity: 0; pointer-events: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .field + .field { margin-top: 0; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* The Admin menu button has an icon: laid out as a row, so that the icon does not lift the text */
.nav > .menu > button { display: inline-flex; align-items: center; gap: 6px; text-box: none; }
.nav > .menu > button > span { display: block; line-height: 1; text-box: trim-both cap alphabetic; }
.nav > .menu > button .svg-icon { margin: 0; vertical-align: baseline; }

/* CMS admin: the generated forms and the media library */
.cms-editor { display: grid; gap: 0; }
.cms-editor .field + .field { margin-top: 18px; }
.cms-object-body { border-left: 2px solid var(--line-soft); padding-left: 16px; margin-top: 4px; }
.cms-items { display: grid; gap: 10px; }
.cms-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--chassis); }
.cms-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--line-soft); }
.cms-item-title { font-weight: 650; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cms-item-body { padding: 14px; }
.cms-item-body .field + .field { margin-top: 14px; }
.cms-markdown textarea[hidden], .cms-markdown [data-md-preview][hidden] { display: none; }
.cms-markdown .tabs { margin-bottom: 8px; }
.cms-markdown [data-md-preview] { padding: 12px 16px; max-width: none; }
.media-field { display: flex; align-items: center; gap: 14px; }
.media-preview, .media-thumb { width: 64px; height: 64px; flex: none; display: grid; place-items: center; background: var(--well); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; color: var(--faint); }
.media-preview img, .media-thumb img { width: 100%; height: 100%; object-fit: contain; }
.media-info { display: grid; gap: 8px; min-width: 0; }
.media-big { display: grid; place-items: center; background: var(--well); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 16px; }
.media-big img { max-width: 100%; max-height: 240px; }
dialog.picker { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--text); }
dialog.picker::backdrop { background: rgba(0, 0, 0, 0.5); }
.picker-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; padding: 16px; }
.picker-item { display: grid; gap: 6px; justify-items: center; padding: 8px; border: 1px solid transparent; border-radius: var(--radius-sm); background: none; color: inherit; cursor: pointer; font: inherit; }
.picker-item:hover, .picker-item:focus-visible { border-color: var(--amber); background: var(--chassis); }
.picker-item .media-thumb { width: 96px; height: 96px; }
.picker-name { font-size: 12.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-picker { position: relative; }
.icon-picker > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.icon-picker > summary::-webkit-details-marker { display: none; }
.icon-picker .icon-current .svg-icon { width: 20px; height: 20px; display: block; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, 44px); gap: 6px; padding: 12px 0 4px; }
.icon-grid label { cursor: pointer; }
.icon-grid input { position: absolute; opacity: 0; pointer-events: none; }
.icon-grid span { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--well); color: var(--muted); }
.icon-grid label:hover span { border-color: var(--muted); color: var(--text); }
.icon-grid input:checked + span { border-color: var(--amber); color: var(--text); box-shadow: 0 0 0 3px var(--amber-dim); }
.icon-grid input:focus-visible + span { outline: 2px solid var(--amber); }
.icon-grid .svg-icon { width: 22px; height: 22px; }
.zoom, .media-preview img, .media-big img { cursor: zoom-in; }
button.media-thumb { padding: 0; font: inherit; }
dialog.lightbox { max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; padding: 32px; border: 0; background: transparent; display: none; place-items: center; cursor: zoom-out; }
dialog.lightbox[open] { display: grid; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, 0.85); }
dialog.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; background: var(--well); }
dialog.lightbox button { position: absolute; top: 16px; right: 16px; font-size: 24px; line-height: 1; }
.media-table { table-layout: fixed; }
.media-table th:nth-child(1) { width: 76px; }
.media-table th:nth-child(3) { width: 130px; }
.media-table th:nth-child(4) { width: 90px; }
.media-table th:nth-child(5) { width: 120px; }
.media-table th:nth-child(6) { width: 112px; }
.media-table td.right { overflow: visible; }
.media-table .cell-sub .status { margin-left: 8px; }
.media-table .clip { display: block; max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) { .media-table th:nth-child(3), .media-table td:nth-child(3) { display: none; } }
.media-table td { overflow: hidden; text-overflow: ellipsis; }
body.drop-active::after { content: 'Drop files to add them to the library'; position: fixed; inset: 12px; z-index: 50; display: grid; place-items: center; border: 2px dashed var(--amber); border-radius: var(--radius); background: rgba(19, 18, 21, 0.78); color: #f3efe8; font-size: 20px; font-weight: 650; pointer-events: none; }
dialog.picker.drop-active { outline: 2px dashed var(--amber); outline-offset: -8px; }

/* Help page: questions */
.faq-section { scroll-margin-top: 96px; }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq details:last-child { border-bottom: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-weight: 650; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--line-soft); }
.faq summary .svg-icon { flex: none; color: var(--faint); transition: transform var(--t); }
.faq details[open] summary .svg-icon { transform: rotate(180deg); }
.faq .answer { padding: 0 20px 18px; color: var(--muted); max-width: 740px; }
.faq .answer > * + * { margin-top: 0.8em; }
.faq .answer a { color: var(--hue); font-weight: 550; }
.faq .more { padding: 14px 20px; border-top: 1px solid var(--line-soft); }
.faq-title { display: flex; align-items: center; gap: 14px; }
.faq-title .ic { flex: none; width: 40px; height: 40px; border-radius: var(--radius); display: grid; place-items: center; background: var(--hue-dim); color: var(--hue); }

/* Help page: search */
.help-search { max-width: 560px; margin: 24px 0 0; }
.help-search .input { height: 48px; font-size: 16px; padding-left: 44px; }
.help-search .svg-icon { left: 16px; top: 15px; }
#help-results { margin-top: 8px; display: grid; gap: 28px; }
#help-results[hidden], #help-body[hidden], .help-search[hidden] { display: none; }
.help-results-block .label { margin-bottom: 10px; }
.help-result { display: grid; gap: 4px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); color: inherit; }
.help-result:last-child { border-bottom: 0; }
.help-result:hover, .help-result:focus-visible { background: var(--line-soft); }
.help-result b { font-weight: 650; }
.help-result-group { font-size: 12.5px; color: var(--faint); }
.help-result-text { font-size: 14px; color: var(--muted); max-width: 740px; }
.help-result mark { background: var(--amber-dim); color: var(--text); border-radius: 3px; padding: 0 2px; }

/* Manual: search */
.docs-search[hidden], .docs-results[hidden], .docs-nav .toc-list[hidden] { display: none; }
.docs-results { display: grid; gap: 2px; }
.docs-nav a.docs-result { display: grid; gap: 2px; padding: 8px 10px; }
.docs-result b { font-weight: 650; color: var(--text); font-size: 14px; }
.docs-result span { font-size: 12.5px; color: var(--muted); }
.docs-result .docs-result-group { color: var(--faint); font-size: 12px; }
.docs-result mark { background: var(--amber-dim); color: var(--text); border-radius: 3px; padding: 0 2px; }

/* ---------------- Offers ---------------- */
/* The line under the menu */
.offer-bar { background: var(--chassis); border-bottom: 1px solid var(--line); font-size: 13px; }
.offer-bar .wrap { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 40px; }
.offer-slide { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); text-decoration: none; }
.offer-slide:hover .offer-text { text-decoration: underline; text-underline-offset: 3px; }
.offer-slide[hidden] { display: none; }
.offer-slide > .svg-icon { flex: none; width: 14px; height: 14px; color: var(--hue); }
.offer-in { animation: offer-in 0.35s ease; }
@keyframes offer-in { from { opacity: 0; transform: translateY(4px); } }
.offer-badge { flex: none; padding: 2px 8px; border-radius: var(--radius-sm); background: var(--hue-dim); color: var(--hue); font-weight: 750; font-variant-numeric: tabular-nums; }
.offer-text { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.offer-ends { flex: none; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.offer-code { flex: none; color: var(--muted); white-space: nowrap; }
.offer-code code { color: var(--text); font-weight: 650; padding: 1px 6px; border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.offer-code-lg { font-size: 15px; }
.offer-dots { flex: none; display: flex; gap: 6px; }
.offer-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; }
.offer-dots button.on { background: var(--text); }
@media (prefers-reduced-motion: reduce) { .offer-in { animation: none; } }
@media (max-width: 640px) {
    .offer-bar .offer-ends, .offer-bar .offer-code { display: none; }
}

/* At the top of the home page */
.offer-home { padding-top: 32px; }
.offer-feature {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; padding: 40px;
    background: radial-gradient(120% 140% at 0% 0%, var(--hue-dim), transparent 60%), var(--chassis);
}
.offer-feature.no-media { grid-template-columns: minmax(0, 1fr); }
.offer-feature.no-media .lead { max-width: 640px; }
.offer-feature .lead p { margin: 0; }
.offer-media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.offer-media img { display: block; width: 100%; height: auto; }
.offer-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; color: var(--text); text-decoration: none; transition: border-color 0.2s ease; }
.offer-card:hover { border-color: var(--hue); }
@media (max-width: 860px) {
    .offer-feature { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 24px; }
}
