/* VisuaLeaf Playground: the page around the widgets (the widgets style themselves). */

:root {
    --pg-green-900: #064e3b;
    --pg-green-700: #047857;
    --pg-green-600: #059669;
    --pg-green-500: #10b981;
    --pg-green-100: #d1fae5;
    --pg-ink: #0f172a;
    --pg-text: #4b5563;
    --pg-muted: #6b7280;
    --pg-line: rgba(6, 78, 59, 0.12);
    --pg-surface: #ffffff;
    --pg-wash: #f5f9f6;
    --pg-bar-h: 64px;
}

/* The widgets fill whatever frame holds them. */
visualeaf-shell, visualeaf-collection, visualeaf-aggregation,
visualeaf-sql, visualeaf-table, visualeaf-table-manager, visualeaf-schema {
    display: block;
    width: 100%;
    height: 100%;
}

/* ---------- Hero ---------- */
.pg-hero {
    padding: 128px 0 40px;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(16, 185, 129, 0.12) 0%, transparent 55%),
        linear-gradient(180deg, #ffffff 0%, var(--pg-wash) 100%);
}
.pg-hero-inner { max-width: 880px; margin: 0 auto; padding: 0 16px; text-align: center; }
.pg-hero .feature-title { margin-bottom: 16px; }
.pg-hero .feature-description { font-size: 1.15rem; line-height: 1.7; }
.pg-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--pg-green-700); background: rgba(16, 185, 129, 0.12);
    padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.pg-eyebrow .pg-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--pg-green-500);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, .6); animation: pg-pulse 2s infinite;
}
@keyframes pg-pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .55); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.pg-facts {
    list-style: none; padding: 0; margin: 26px 0 0;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px;
    color: var(--pg-text); font-size: .95rem;
}
.pg-facts li { display: inline-flex; align-items: center; gap: 8px; }
.pg-facts i { color: var(--pg-green-500); }
.pg-switch { margin: 18px 0 0; font-size: .92rem; color: var(--pg-muted, #64748b); }
.pg-switch a { color: var(--pg-green-700, #047857); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.pg-switch a:hover { text-decoration: underline; }
.pg-switch a .fa-arrow-right { font-size: .75em; }

/* ---------- Workbench ---------- */
.pg-bench { background: var(--pg-wash); padding: 8px 0 56px; }
.pg-bench-inner { max-width: 1640px; margin: 0 auto; padding: 0 24px; }

.pg-bar {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    min-height: var(--pg-bar-h);
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid var(--pg-line);
    border-radius: 14px 14px 0 0;
    box-shadow: 0 1px 2px rgba(6, 78, 59, 0.04);
}

.pg-tabs { display: flex; gap: 4px; background: #eef4f0; padding: 4px; border-radius: 11px; }
.pg-tab {
    display: inline-flex; align-items: center; gap: 8px;
    border: 0; background: transparent; cursor: pointer;
    font: 600 .92rem/1 Arial, Helvetica, sans-serif; color: var(--pg-text);
    padding: 10px 14px; border-radius: 8px;
    transition: background .15s, color .15s, box-shadow .15s;
}
.pg-tab i { font-size: .95rem; color: var(--pg-muted); transition: color .15s; }
.pg-tab:hover { color: var(--pg-green-900); }
.pg-tab[aria-selected="true"] {
    background: #fff; color: var(--pg-green-900);
    box-shadow: 0 1px 2px rgba(6, 78, 59, 0.08), 0 4px 10px -4px rgba(6, 78, 59, 0.18);
}
.pg-tab[aria-selected="true"] i { color: var(--pg-green-600); }
.pg-tab:focus-visible, .pg-btn:focus-visible, .pg-handle:focus-visible, .pg-num input:focus-visible {
    outline: 2px solid var(--pg-green-500); outline-offset: 2px;
}

.pg-size { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pg-group { display: flex; gap: 2px; background: #eef4f0; padding: 3px; border-radius: 10px; }
.pg-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-width: 34px; height: 32px; padding: 0 10px;
    border: 0; border-radius: 7px; background: transparent; cursor: pointer;
    font: 600 .82rem/1 Arial, Helvetica, sans-serif; color: var(--pg-text);
    transition: background .15s, color .15s;
}
.pg-btn:hover { background: #fff; color: var(--pg-green-900); }
.pg-btn.is-active { background: #fff; color: var(--pg-green-700); box-shadow: 0 1px 2px rgba(6, 78, 59, 0.1); }
.pg-btn-solid { background: var(--pg-green-600); color: #fff; }
.pg-btn-solid:hover { background: var(--pg-green-700); color: #fff; }

.pg-dims {
    display: flex; align-items: center; gap: 4px;
    background: #fff; border: 1px solid var(--pg-line); border-radius: 10px; padding: 3px 8px;
    font: 600 .8rem/1 ui-monospace, Menlo, monospace; color: var(--pg-muted);
}
.pg-num { display: inline-flex; align-items: center; gap: 4px; }
.pg-num span { font-size: .7rem; color: #9ca3af; }
.pg-num input {
    width: 56px; height: 26px; border: 0; background: transparent; text-align: right;
    font: 600 .85rem/1 ui-monospace, Menlo, monospace; color: var(--pg-ink);
    border-radius: 6px; -moz-appearance: textfield;
}
.pg-num input::-webkit-outer-spin-button, .pg-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pg-num input:hover { background: #f3f7f4; }

/* The intro line under the bar, for the active widget */
.pg-intro {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    padding: 16px 18px;
    background: #fff;
    border-left: 1px solid var(--pg-line); border-right: 1px solid var(--pg-line);
}
.pg-intro-text { max-width: 860px; }
.pg-intro h2 { margin: 0 0 4px; font-size: 1.1rem; font-weight: 700; color: var(--pg-green-900); }
.pg-intro p { margin: 0; color: var(--pg-text); line-height: 1.6; font-size: .95rem; }
.pg-intro code, .pg-docs code {
    font: .85em ui-monospace, Menlo, monospace; background: #eef4f0; color: var(--pg-green-900);
    padding: 1px 5px; border-radius: 5px;
}
.pg-tips { display: flex; flex-wrap: wrap; gap: 6px; align-self: center; }
.pg-tip {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .78rem; color: var(--pg-text);
    background: var(--pg-wash); border: 1px solid var(--pg-line); border-radius: 999px; padding: 5px 10px;
}
.pg-tip kbd {
    font: 600 .72rem ui-monospace, Menlo, monospace; color: var(--pg-ink);
    background: #fff; border: 1px solid #d6e2da; border-bottom-width: 2px; border-radius: 4px; padding: 0 4px;
}

/* The stage: a dotted canvas the frame sits on */
.pg-stage {
    position: relative;
    display: flex; justify-content: center; align-items: flex-start;
    padding: 24px 24px 40px;
    border: 1px solid var(--pg-line); border-top: 0;
    border-radius: 0 0 14px 14px;
    background-color: #eaf1ec;
    background-image: radial-gradient(rgba(6, 78, 59, 0.16) 1px, transparent 1px);
    background-size: 18px 18px;
    overflow: hidden;
}
.pg-frame {
    position: relative;
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    background: #0f172a;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12), 0 30px 70px -30px rgba(6, 78, 59, 0.45), 0 12px 24px -16px rgba(15, 23, 42, 0.3);
}
/* isolation: the widgets' own z-indexes (frozen grid columns, menus) stay under the site's header. */
.pg-viewport { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; isolation: isolate; }
.pg-host { position: absolute; inset: 0; }
.pg-host[hidden] { display: none; }

.pg-loading {
    position: absolute; inset: 0; z-index: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    color: #a7f3d0; font-size: .95rem; background: #0f172a; pointer-events: none;
    transition: opacity .35s;
}
.pg-loading.is-done { opacity: 0; }
.pg-spinner {
    width: 34px; height: 34px; border-radius: 50%;
    border: 3px solid rgba(167, 243, 208, 0.2); border-top-color: var(--pg-green-500);
    animation: pg-spin .8s linear infinite;
}
@keyframes pg-spin { to { transform: rotate(360deg); } }

/* Resize handles */
.pg-handle { position: absolute; z-index: 3; touch-action: none; outline: none; }
.pg-handle-e, .pg-handle-w { top: 0; bottom: 0; width: 18px; cursor: ew-resize; }
.pg-handle-e { right: -18px; }
.pg-handle-w { left: -18px; }
.pg-handle-s { left: 0; right: 0; height: 18px; bottom: -18px; cursor: ns-resize; }
.pg-handle-se { right: -18px; bottom: -18px; width: 22px; height: 22px; cursor: nwse-resize; }
.pg-handle-sw { left: -18px; bottom: -18px; width: 22px; height: 22px; cursor: nesw-resize; }
.pg-handle-e::before, .pg-handle-w::before {
    content: ""; position: absolute; top: 50%; left: 50%; width: 5px; height: 44px; margin: -22px 0 0 -2.5px;
    border-radius: 3px; background: rgba(6, 78, 59, 0.28); transition: background .15s, height .15s, margin .15s;
}
.pg-handle-s::before {
    content: ""; position: absolute; top: 50%; left: 50%; width: 44px; height: 5px; margin: -2.5px 0 0 -22px;
    border-radius: 3px; background: rgba(6, 78, 59, 0.28); transition: background .15s, width .15s, margin .15s;
}
.pg-handle-se::before, .pg-handle-sw::before {
    content: ""; position: absolute; width: 10px; height: 10px; top: 4px;
    border-bottom: 3px solid rgba(6, 78, 59, 0.3);
}
.pg-handle-se::before { left: 4px; border-right: 3px solid rgba(6, 78, 59, 0.3); border-radius: 0 0 4px 0; }
.pg-handle-sw::before { right: 4px; border-left: 3px solid rgba(6, 78, 59, 0.3); border-radius: 0 0 0 4px; }
.pg-handle:hover::before, .pg-handle:focus-visible::before, .pg-handle.is-dragging::before { background: var(--pg-green-600); border-color: var(--pg-green-600); }
.pg-handle-e:hover::before, .pg-handle-w:hover::before, .pg-handle-e.is-dragging::before, .pg-handle-w.is-dragging::before { height: 72px; margin-top: -36px; }
.pg-handle-s:hover::before, .pg-handle-s.is-dragging::before { width: 72px; margin-left: -36px; }

.pg-badge {
    position: absolute; z-index: 4; left: 50%; bottom: -34px; transform: translateX(-50%);
    font: 600 .78rem/1 ui-monospace, Menlo, monospace; color: #fff; background: var(--pg-green-900);
    padding: 6px 10px; border-radius: 7px; white-space: nowrap;
    opacity: 0; transition: opacity .15s; pointer-events: none;
}
.pg-frame.is-resizing .pg-badge { opacity: 1; }
/* While dragging, the widget's iframes must not swallow the pointer. */
.pg-frame.is-resizing .pg-viewport { pointer-events: none; user-select: none; }
body.pg-dragging { user-select: none; }
body.pg-dragging-ew, body.pg-dragging-ew * { cursor: ew-resize !important; }
body.pg-dragging-ns, body.pg-dragging-ns * { cursor: ns-resize !important; }
body.pg-dragging-nwse, body.pg-dragging-nwse * { cursor: nwse-resize !important; }
body.pg-dragging-nesw, body.pg-dragging-nesw * { cursor: nesw-resize !important; }

/* Focus mode: the bench takes the whole window */
.pg-bench.is-focus {
    position: fixed; inset: 0; z-index: 10000; padding: 12px; overflow: auto;
}
.pg-bench.is-focus .pg-bench-inner { max-width: none; padding: 0; }
.pg-bench.is-focus .pg-intro { display: none; }
body.pg-focus-open { overflow: hidden; }

/* ---------- Docs below the bench ---------- */
.pg-docs { background: #fff; padding: 72px 0 40px; }
.pg-docs-inner { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.pg-section-head { max-width: 720px; margin: 0 0 32px; }
.pg-kicker { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pg-green-600); margin: 0 0 8px; }
.pg-section-head h2 { font-size: 2rem; font-weight: 800; color: var(--pg-green-900); margin: 0 0 10px; letter-spacing: -0.01em; line-height: 1.2; }
.pg-section-head p { color: var(--pg-text); line-height: 1.7; margin: 0; font-size: 1.05rem; }

.pg-embed { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: start; }
.pg-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.pg-steps li { position: relative; padding: 0 0 24px 52px; counter-increment: step; }
.pg-steps li::before {
    content: counter(step); position: absolute; left: 0; top: -2px;
    width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--pg-green-500), var(--pg-green-600));
}
.pg-steps li:not(:last-child)::after {
    content: ""; position: absolute; left: 16px; top: 38px; bottom: 4px; width: 2px; background: var(--pg-green-100);
}
.pg-steps h3 { margin: 4px 0 6px; font-size: 1.05rem; color: var(--pg-ink); }
.pg-steps p { margin: 0; color: var(--pg-text); line-height: 1.65; font-size: .95rem; }

.pg-code {
    position: relative; border-radius: 14px; overflow: hidden; background: #0b1220;
    box-shadow: 0 24px 50px -28px rgba(6, 78, 59, 0.55);
}
.pg-code-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 12px 10px 16px; background: #111a2e; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #94a3b8; font-size: .8rem;
}
.pg-code-head strong { color: #e2e8f0; font-weight: 600; }
.pg-copy {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04); color: #cbd5e1;
    font: 600 .78rem/1 Arial, Helvetica, sans-serif; padding: 7px 10px; border-radius: 7px;
    transition: background .15s, color .15s;
}
.pg-copy:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.pg-copy.is-copied { color: #6ee7b7; border-color: rgba(110, 231, 183, 0.4); }
.pg-code pre {
    margin: 0; padding: 16px 18px; overflow-x: auto;
    font: 13px/1.65 ui-monospace, Menlo, monospace; color: #e2e8f0;
}
.pg-code pre code { background: none; color: inherit; padding: 0; font: inherit; }
.pg-code .t-tag { color: #7dd3fc; }
.pg-code .t-attr { color: #a7f3d0; }
.pg-code .t-str { color: #fcd34d; }
.pg-code .t-com { color: #64748b; }
.pg-code-note { margin: 12px 2px 0; font-size: .85rem; color: var(--pg-muted); line-height: 1.6; }

/* Recipes */
.pg-recipes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 64px; }
.pg-recipe {
    display: flex; flex-direction: column;
    border: 1px solid var(--pg-line); border-radius: 16px; background: #fff; overflow: hidden;
    box-shadow: 0 1px 2px rgba(6, 78, 59, 0.04), 0 12px 28px -18px rgba(6, 78, 59, 0.18);
}
.pg-recipe-body { padding: 22px 22px 16px; flex: 1; }
.pg-recipe-icon {
    width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    color: #fff; background: linear-gradient(135deg, var(--pg-green-500), var(--pg-green-600)); margin-bottom: 14px;
}
.pg-recipe h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--pg-green-900); }
.pg-recipe p { margin: 0; color: var(--pg-text); font-size: .92rem; line-height: 1.6; }
.pg-recipe .pg-code { border-radius: 0; box-shadow: none; }
.pg-recipe .pg-code pre { font-size: 12px; padding: 14px 16px; }
/* The snippet's iframe URL is long: wrap it rather than scroll. */
.pg-embed .pg-code pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Attribute reference */
.pg-ref { margin-top: 72px; }
.pg-ref-tabs { display: inline-flex; gap: 4px; background: #eef4f0; padding: 4px; border-radius: 11px; margin-bottom: 16px; flex-wrap: wrap; }
.pg-ref-panel[hidden] { display: none; }
.pg-table-wrap { border: 1px solid var(--pg-line); border-radius: 14px; overflow: hidden; overflow-x: auto; }
.pg-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.pg-table th, .pg-table td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid #edf2ef; }
.pg-table tr:last-child td { border-bottom: 0; }
.pg-table th { background: var(--pg-wash); color: var(--pg-green-900); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.pg-table td:first-child { white-space: nowrap; width: 1%; }
.pg-table td { color: var(--pg-text); line-height: 1.55; }

/* CTA */
.pg-cta { padding: 40px 0 88px; background: #fff; }
.pg-cta-card {
    max-width: 1120px; margin: 0 auto; padding: 0 16px;
}
.pg-cta-inner {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    padding: 36px 40px; border-radius: 22px; color: #eafff5;
    background: linear-gradient(135deg, #064e3b 0%, #065f46 55%, #059669 100%);
    box-shadow: 0 24px 60px -30px rgba(6, 78, 59, 0.6);
}
.pg-cta-inner h2 { margin: 0 0 6px; font-size: 1.6rem; color: #fff; }
.pg-cta-inner p { margin: 0; color: #c7f5e2; line-height: 1.6; max-width: 620px; }
.pg-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.pg-cta-primary, .pg-cta-secondary {
    display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700;
    padding: 12px 22px; border-radius: 10px; transition: transform .15s, background .15s;
}
.pg-cta-primary { background: #fff; color: #064e3b; }
.pg-cta-primary:hover { transform: translateY(-2px); }
.pg-cta-secondary { color: #fff; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.25); }
.pg-cta-secondary:hover { background: rgba(255, 255, 255, 0.2); }

/* ---------- Narrow screens ---------- */
@media (max-width: 1024px) {
    .pg-embed { grid-template-columns: 1fr; }
    .pg-recipes { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .pg-hero { padding-top: 104px; }
    .pg-bench-inner { padding: 0 8px; }
    .pg-bar { position: static; }
    .pg-tab span { display: none; }
    .pg-tab { padding: 10px 12px; }
    .pg-presets .pg-btn span { display: none; }
    .pg-stage { padding: 16px 22px 34px; }
    .pg-section-head h2 { font-size: 1.6rem; }
    .pg-cta-inner { padding: 28px 22px; }
}

/* ---------- Embed tabs: own page / JSFiddle ---------- */
.pg-embed-tabs { margin-bottom: 24px; }
.pg-embed-panel[hidden], .pg-fiddle-code[hidden] { display: none; }
.pg-panel-lead { color: var(--pg-text); line-height: 1.7; margin: 0 0 28px; font-size: 1.05rem; max-width: 760px; }
.pg-panel-lead a, .pg-code-note a, .pg-steps a { color: var(--pg-green-600); font-weight: 600; }
.pg-fiddle-key pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.pg-fiddle-title { margin: 48px 0 6px; font-size: 1.25rem; color: var(--pg-green-900); }
.pg-fiddle-sub { margin: 0 0 16px; color: var(--pg-text); line-height: 1.6; }
.pg-fiddle-code pre { max-height: 520px; overflow: auto; }

/* Prism tokens in the code panels, in the snippet's palette */
.pg-code .token.comment, .pg-code .token.prolog, .pg-code .token.doctype, .pg-code .token.cdata { color: #64748b; font-style: italic; }
.pg-code .token.punctuation { color: #94a3b8; }
.pg-code .token.tag, .pg-code .token.selector, .pg-code .token.class-name { color: #7dd3fc; }
.pg-code .token.tag .token.punctuation { color: #7dd3fc; }
.pg-code .token.attr-name, .pg-code .token.property { color: #a7f3d0; }
.pg-code .token.attr-value, .pg-code .token.string, .pg-code .token.template-string, .pg-code .token.url { color: #fcd34d; }
.pg-code .token.attr-value .token.punctuation { color: #fcd34d; }
.pg-code .token.keyword, .pg-code .token.atrule, .pg-code .token.important { color: #c4b5fd; }
.pg-code .token.function { color: #f9a8d4; }
.pg-code .token.number, .pg-code .token.boolean, .pg-code .token.unit, .pg-code .token.hexcode, .pg-code .token.color { color: #fdba74; }
.pg-code .token.operator, .pg-code .token.entity { color: #e2e8f0; }
.pg-code .token.variable, .pg-code .token.builtin { color: #93c5fd; }
.pg-code .token.regex { color: #6ee7b7; }
.pg-code .token.interpolation-punctuation { color: #c4b5fd; }

/* Recipe cards: text and code on shared rows, so the three code blocks start and end level */
.pg-recipes { grid-template-rows: auto auto; row-gap: 0; }
.pg-recipe { display: grid; grid-template-rows: subgrid; grid-row: span 2; margin-bottom: 0; }
.pg-recipe-body { flex: none; }
.pg-recipe .pg-code { display: flex; flex-direction: column; }
.pg-recipe .pg-code pre { flex: 1; white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: hidden; }
@media (max-width: 1024px) {
    .pg-recipes { grid-template-rows: none; row-gap: 20px; }
    .pg-recipe { grid-template-rows: auto 1fr; grid-row: auto; }
}

/* ---------- JavaScript API tab ---------- */
.pg-api { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 24px; align-items: start; }
.pg-api-actions { display: grid; gap: 14px; }
.pg-api-action {
    border: 1px solid var(--pg-line); border-radius: 14px; background: #fff; overflow: hidden;
    box-shadow: 0 1px 2px rgba(6, 78, 59, 0.04);
}
.pg-api-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 0; }
.pg-api-tag { font: 600 .75rem ui-monospace, Menlo, monospace; padding: 3px 8px; border-radius: 6px; background: #eef4f0; color: var(--pg-green-900); }
.pg-api-tag-collection { background: #e0f2fe; color: #075985; }
.pg-api-tag-aggregation { background: #ede9fe; color: #5b21b6; }
.pg-api-tag-table { background: #e0f2fe; color: #075985; }
.pg-api-tag-manage { background: #ede9fe; color: #5b21b6; }
.pg-api-run {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer; border: 0;
    font: 700 .8rem/1 Arial, Helvetica, sans-serif; color: #fff;
    background: linear-gradient(135deg, var(--pg-green-500), var(--pg-green-600));
    padding: 8px 14px; border-radius: 8px; transition: transform .15s, opacity .15s;
}
.pg-api-run:hover { transform: translateY(-1px); }
.pg-api-run:disabled { opacity: .6; cursor: progress; transform: none; }
.pg-api-run i { font-size: .7rem; }
.pg-api-action h4 { margin: 10px 16px 2px; font-size: 1rem; color: var(--pg-ink); }
.pg-api-action p { margin: 0 16px 12px; color: var(--pg-muted); font-size: .88rem; }
.pg-api-action .pg-code { border-radius: 0; box-shadow: none; }
.pg-api-action .pg-code pre { font-size: 12px; padding: 12px 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pg-api-side { position: sticky; top: 16px; display: grid; gap: 14px; }
.pg-api-out pre { min-height: 220px; max-height: 460px; overflow: auto; font-size: 12px; }
.pg-api-events pre { min-height: 90px; max-height: 180px; overflow: auto; font-size: 12px; color: #a7f3d0; }
.pg-api-evname { font: .78rem ui-monospace, Menlo, monospace; color: #a7f3d0; background: none; padding: 0; }
@media (max-width: 1024px) {
    .pg-api { grid-template-columns: 1fr; }
    .pg-api-side { position: static; }
}
.pg-api-out pre { white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: hidden; }

/* The playground widget bundles Font Awesome 7 Pro, whose unscoped
   `.fa-brands { font-family: "Font Awesome 7 Pro" }` rule takes over every
   brand icon on the page (nav YouTube/Discord/GitHub, embed tabs, share
   buttons) and that font has no brand glyphs, so they render blank. Hand
   brand icons back to the site's Font Awesome 6 Brands. */
.fa-brands,
.fab {
  --fa-family: "Font Awesome 6 Brands";
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 400 !important;
}

/* ...and FA7's `::before { content: var(--fa) }` blanks the glyph, because the
   widget's FA7 Pro build never sets --fa for brand icons. Supply the FA6
   codepoints for the brand icons these pages use. */
.fa-brands.fa-css3-alt { --fa: "\f38b"; }
.fa-brands.fa-discord { --fa: "\f392"; }
.fa-brands.fa-github { --fa: "\f09b"; }
.fa-brands.fa-html5 { --fa: "\f13b"; }
.fa-brands.fa-js { --fa: "\f3b8"; }
.fa-brands.fa-jsfiddle { --fa: "\f1cc"; }
.fa-brands.fa-linkedin { --fa: "\f08c"; }
.fa-brands.fa-x-twitter { --fa: "\e61b"; }
.fa-brands.fa-youtube { --fa: "\f167"; }
