:root {
    --bg-dark: #0f111a;
    --bg-panel: #1a1d27;
    --text-main: #c0c5ce;
    --text-muted: #828c9a;
    --primary: #4facfe;
    --primary-dim: #4facfe33;
    --border: #2c3245;
    --success: #a3be8c;
    --warning: #ebcb8b;
    --danger: #bf616a;
    --keyword: #b48ead;
    --font-heading: system-ui, -apple-system, sans-serif;
    --font-body: system-ui, -apple-system, sans-serif;
    --font-mono: 'Consolas', 'Monaco', 'Courier New', monospace;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: #ffffff; }

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

header {
    background-color: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
}

nav a {
    margin-left: 1.5rem;
    font-size: 0.9rem;
}

section {
    padding: 4rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    max-width: 800px;
}

.lead {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 900px;
}

code {
    font-family: var(--font-mono);
    background-color: var(--border);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    color: #ffffff;
}

/* Tool Section */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.input-pane, .output-pane {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pane-header {
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
}

.btn-sm {
    background: var(--primary-dim);
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s;
}
.btn-sm:hover {
    background: var(--primary);
    color: #fff;
}

tarea {
    width: 100%;
    border: none;
}

#sql-input {
    flex-grow: 1;
    min-height: 400px;
    background: transparent;
    color: #d8dee9;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    resize: none;
    outline: none;
}

.flow-container {
    padding: 1rem;
    flex-grow: 1;
    overflow-y: auto;
    max-height: 500px;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    margin-top: 3rem;
    font-style: italic;
}

.execution-step {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 1rem;
    padding: 1rem;
    border-left: 4px solid var(--primary);
}

.execution-step h4 {
    margin-bottom: 0.5rem;
    color: var(--keyword);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.execution-step pre {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--success);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Guide */
.step-card {
    display: flex;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 1.5rem;
    overflow: hidden;
}

.step-number {
    background: var(--border);
    color: var(--text-main);
    font-size: 1.5rem;
    font-weight: bold;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

.step-content {
    padding: 1.5rem;
}

.step-content h3 {
    color: var(--keyword);
    margin-bottom: 0.5rem;
}

.conclusion {
    margin-top: 3rem;
    background: var(--primary-dim);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--primary);
}

.ad-container {
    min-height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    background: var(--bg-panel);
    border: 1px dashed var(--border);
}

footer {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4rem;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    margin: 0 0.75rem;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    #sql-input {
        min-height: 200px;
    }
    .flow-container {
        max-height: none;
    }
    .nav-bar {
        flex-direction: column;
        gap: 1rem;
    }
    .step-card {
        flex-direction: column;
    }
    .step-number {
        padding: 0.5rem;
        min-height: auto;
    }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
