/* ═══════════════════════════════════════════════
   BLUEPRINT PLAYGROUND — Split Pane Preview
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-page: hsl(40, 30%, 97%);
    --bg-white: hsl(0, 0%, 100%);
    --bg-warm: hsl(35, 40%, 95%);
    --bg-soft: hsl(30, 20%, 93%);
    --bg-card: hsl(0, 0%, 100%);
    --border: hsl(30, 15%, 88%);
    --border-hover: hsl(30, 20%, 78%);
    --text-0: hsl(220, 20%, 16%);
    --text-1: hsl(220, 10%, 38%);
    --text-2: hsl(220, 8%, 55%);
    --text-3: hsl(220, 6%, 68%);
    --accent: hsl(245, 58%, 56%);
    --accent-light: hsl(245, 58%, 64%);
    --accent-bg: hsl(245, 60%, 96%);
    --accent-border: hsl(245, 50%, 88%);
    --coral: hsl(12, 80%, 62%);
    --amber: hsl(38, 92%, 55%);
    --teal: hsl(170, 50%, 45%);
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', monospace;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-pill: 100px;
    --transition: 200ms ease;
    --shadow-sm: 0 1px 3px hsla(220, 20%, 16%, 0.06);
    --shadow-md: 0 4px 16px hsla(220, 20%, 16%, 0.08);
    --shadow-lg: 0 8px 32px hsla(220, 20%, 16%, 0.1);
    --shadow-btn: 0 2px 8px hsla(245, 58%, 56%, 0.2);

    /* Dark pane colors */
    --dark-bg: hsl(225, 18%, 12%);
    --dark-bg-header: hsl(225, 16%, 16%);
    --dark-text: hsl(220, 8%, 68%);
    --dark-accent: hsl(245, 60%, 72%);
    --dark-teal: hsl(170, 60%, 55%);
    --dark-amber: hsl(38, 90%, 65%);
    --dark-dim: hsl(220, 6%, 45%);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    background: var(--bg-page);
    color: var(--text-0);
    min-height: 100vh;
    overflow-x: hidden;
}

.playground-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.playground-app>#shared-footer {
    margin-top: auto;
}

/* ─── Intro ─── */

.pg-main {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 32px 60px;
}

.pg-intro {
    text-align: center;
    margin-bottom: 40px;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 8px;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    color: var(--text-0);
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-2);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ─── Split Panes ─── */

.pg-panes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    min-height: 520px;
}

.pg-pane {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.pane-header {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 16px;
    background: var(--bg-warm);
    border-bottom: 1px solid var(--border);
}

.pane-header.dark {
    background: var(--dark-bg-header);
    border-bottom: 1px solid hsla(220, 10%, 20%, 0.6);
}

.pane-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.pane-dot.red {
    background: hsl(0, 60%, 55%);
}

.pane-dot.yellow {
    background: hsl(40, 80%, 55%);
}

.pane-dot.green {
    background: hsl(130, 50%, 48%);
}

.pane-title {
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--text-2);
    margin-left: 8px;
}

.pane-header.dark .pane-title {
    color: hsl(220, 8%, 50%);
}

.pane-body {
    flex: 1;
    padding: 20px;
    background: var(--bg-card);
    overflow-y: auto;
}

.pane-body.dark {
    background: var(--dark-bg);
}

/* ─── Input Pane ─── */

.pg-input-pane {
    border: 1px solid var(--border);
}

.pg-textarea {
    width: 100%;
    min-height: 180px;
    resize: vertical;
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-0);
    font-family: var(--sans);
    font-size: 0.92rem;
    line-height: 1.6;
    padding: 16px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.pg-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px hsla(245, 58%, 56%, 0.1);
}

.pg-textarea::placeholder {
    color: var(--text-3);
}

.pg-input-footer {
    margin-top: 14px;
}

.pg-meta {
    font-size: 0.72rem;
    color: var(--text-3);
    display: block;
    margin-bottom: 12px;
}

.pg-starter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.starter-chip {
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--bg-white);
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-1);
    cursor: pointer;
    transition: all 200ms ease;
    white-space: nowrap;
}

.starter-chip:hover {
    background: var(--accent-bg);
    border-color: var(--accent-border);
    color: var(--accent);
    transform: translateY(-1px);
}

/* ─── Preview Pane ─── */

.pg-preview-pane {
    border: 1px solid hsla(220, 10%, 20%, 0.3);
}

.pg-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    text-align: center;
    color: var(--dark-dim);
}

.pg-empty-state .empty-icon {
    font-size: 2.4rem;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

.pg-empty-state p {
    font-size: 0.88rem;
    line-height: 1.6;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* ─── Blueprint Rendering ─── */

.pg-blueprint {
    font-family: var(--mono);
    font-size: 0.78rem;
    line-height: 1.8;
    color: var(--dark-text);
}

.bp-section {
    margin-bottom: 20px;
    animation: sectionReveal 400ms ease forwards;
    opacity: 0;
    transform: translateY(6px);
}

@keyframes sectionReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bp-h1 {
    color: var(--dark-amber);
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 12px;
}

.bp-h2 {
    color: var(--dark-accent);
    font-weight: 600;
    font-size: 0.82rem;
    margin: 16px 0 8px;
}

.bp-h3 {
    color: var(--dark-dim);
    font-size: 0.76rem;
    margin: 10px 0 6px;
}

.bp-line {
    padding: 2px 0;
    overflow: hidden;
}

.bp-line .typing {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    animation: typeIn 600ms steps(40) forwards;
    max-width: 0;
}

@keyframes typeIn {
    to {
        max-width: 100%;
    }
}

.bp-table-row {
    display: flex;
    gap: 12px;
    padding: 3px 0;
    border-bottom: 1px solid hsla(220, 10%, 20%, 0.4);
}

.bp-table-row .bp-col {
    flex: 1;
    font-size: 0.74rem;
}

.bp-table-row .bp-col:first-child {
    color: var(--dark-teal);
    flex: 0 0 130px;
}

.bp-feature {
    margin: 6px 0;
}

.bp-feature .bp-fname {
    color: var(--dark-amber);
}

.bp-feature .bp-fdesc {
    color: var(--dark-dim);
}

.bp-feature .bp-fdetail {
    color: var(--dark-text);
    padding-left: 16px;
    font-size: 0.72rem;
}

.bp-cursor {
    display: inline-block;
    width: 7px;
    height: 14px;
    background: var(--dark-amber);
    margin-left: 2px;
    animation: blink 800ms step-end infinite;
    vertical-align: text-bottom;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* ─── CTA Bar ─── */

.pg-cta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 40px;
    padding: 28px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.pg-cta-text p {
    font-size: 0.92rem;
    color: var(--text-1);
}

.pg-cta-text strong {
    color: var(--text-0);
}

.pg-cta-pricing {
    font-size: 0.75rem !important;
    color: var(--teal) !important;
    font-weight: 600;
    margin-top: 6px;
    letter-spacing: 0.01em;
}

/* ─── Sticky CTA ─── */

.pg-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 14px 32px;
    background: hsla(0, 0%, 100%, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 24px hsla(220, 20%, 16%, 0.08);
    z-index: 50;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1),
        opacity 300ms ease;
}

.pg-sticky-cta.visible {
    transform: translateY(0);
    opacity: 1;
}

.pg-sticky-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-0);
}

.pg-sticky-pricing {
    font-size: 0.72rem;
    color: var(--teal);
    font-weight: 600;
}

/* Buttons (shared) */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-family: var(--sans);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px hsla(245, 58%, 56%, 0.25);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 0.88rem;
    border-radius: 12px;
}

/* ─── Scrollbar ─── */

.pane-body::-webkit-scrollbar {
    width: 5px;
}

.pane-body::-webkit-scrollbar-track {
    background: transparent;
}

.pane-body::-webkit-scrollbar-thumb {
    background: hsla(220, 10%, 40%, 0.3);
    border-radius: 3px;
}

/* ─── Responsive ─── */

@media (max-width: 900px) {
    .pg-panes {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .pg-pane {
        min-height: 320px;
    }

    .pg-cta-bar {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .pg-main {
        padding: 24px 16px 40px;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .pg-sticky-cta {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 20px;
    }

    .pg-sticky-text {
        display: none;
    }
}