/* CrossDBA Design System
   Palette: #0F1419 bg, #E2604A coral, #14B8A6 teal, #F59E0B gold
   Fonts: DM Sans body, JetBrains Mono code
*/

:root {
    --bg:           #0F1419;
    --bg-card:      #161D27;
    --bg-raised:    #1C2533;
    --border:       #2A3547;
    --text:         #D4DDE8;
    --text-muted:   #7A8CA0;
    --coral:        #E2604A;
    --coral-dim:    rgba(226, 96, 74, 0.15);
    --teal:         #14B8A6;
    --teal-dim:     rgba(20, 184, 166, 0.15);
    --gold:         #F59E0B;
    --gold-dim:     rgba(245, 158, 11, 0.15);
    --nav-h:        56px;
}

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

html { font-size: 16px; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navbar ── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}
.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 2rem;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
}
.nav-brand:hover { text-decoration: none; color: var(--text); }
.brand-icon { display: flex; }
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
}
.nav-link {
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.nav-link:hover, .nav-link.active {
    background: var(--bg-raised);
    color: var(--text);
    text-decoration: none;
}
.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}
.user-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
}
.user-menu { position: relative; }
.user-name {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.user-dropdown {
    display: none;
    position: absolute;
    right: 0; top: calc(100% + 0.5rem);
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 160px;
    overflow: hidden;
    z-index: 200;
}
.user-menu:hover .user-dropdown { display: block; }
.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    color: var(--text);
    font-size: 0.875rem;
}
.user-dropdown a:hover { background: var(--border); text-decoration: none; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 7px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: opacity 0.15s, background 0.15s;
    text-decoration: none;
}
.btn:hover { opacity: 0.85; text-decoration: none; }
.btn-primary { background: var(--coral); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg-raised); }
.btn-danger { background: transparent; border: 1px solid #c0392b; color: #e74c3c; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.8rem; }
.btn-icon { background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: 0.4rem 0.6rem; }
.btn-icon.active { color: var(--gold); border-color: var(--gold); }
.btn-google {
    background: #fff;
    color: #333;
    font-size: 1rem;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    gap: 0.6rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.btn-google:hover { opacity: 0.9; text-decoration: none; color: #333; }
.link-btn {
    background: none; border: none; color: var(--teal);
    cursor: pointer; font-size: inherit; padding: 0;
    font-family: inherit;
}
.link-btn:hover { text-decoration: underline; }

/* ── Layout ── */
.main-content {
    margin-top: var(--nav-h);
    flex: 1;
}
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.page-container { padding-top: 2rem; padding-bottom: 3rem; }
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.25rem; }

/* ── Flash messages ── */
.flash-container {
    position: fixed;
    top: calc(var(--nav-h) + 0.5rem);
    right: 1rem;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.flash {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--bg-raised);
    border-left: 3px solid var(--teal);
}
.flash-danger { border-color: var(--coral); }
.flash-warning { border-color: var(--gold); }

/* ── Footer ── */
.footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ── Auth page ── */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--nav-h));
}
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    max-width: 400px;
    width: 100%;
}
.auth-logo { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.auth-logo h1 { font-size: 1.75rem; font-weight: 700; }
.auth-tagline { color: var(--text-muted); margin-bottom: 2rem; }
.auth-note { margin-top: 1rem; color: var(--text-muted); font-size: 0.8rem; }

/* ── Landing ── */
.hero {
    padding: 5rem 0 4rem;
    text-align: center;
    background: radial-gradient(ellipse at 50% 0%, rgba(226,96,74,0.08) 0%, transparent 70%);
}
.hero-badge {
    display: inline-block;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--coral);
    color: var(--coral);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    letter-spacing: 0.04em;
}
.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1rem;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}
.text-teal { color: var(--teal); }
.text-coral { color: var(--coral); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }

.levels-preview { padding: 4rem 0; }
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 2rem; text-align: center; }
.level-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.level-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: border-color 0.2s;
}
.level-card:hover { border-color: var(--coral); }
.level-card-link { text-decoration: none; display: block; }
.level-card-link:hover .level-card { border-color: var(--coral); }
.level-card-link .level-card h3 { color: var(--text); }
.level-card-header { margin-bottom: 0.75rem; }
.level-number { font-size: 0.75rem; font-weight: 600; color: var(--coral); text-transform: uppercase; letter-spacing: 0.06em; }
.level-card h3 { font-size: 1.1rem; font-weight: 700; margin-top: 0.2rem; }
.level-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; margin-bottom: 1rem; }
.level-meta { display: flex; gap: 1rem; font-size: 0.8rem; color: var(--text-muted); }
.level-meta strong { color: var(--text); }

.features { padding: 4rem 0; border-top: 1px solid var(--border); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.feature-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.feature h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }

/* ── Dashboard ── */
.progress-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; margin-bottom: 2.5rem; }
.progress-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}
.progress-card-header { margin-bottom: 0.5rem; }
.progress-card-header h3 { font-size: 1rem; font-weight: 600; }
.progress-card-header h3 a { color: var(--text); }
.level-badge { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--coral); }
.progress-description { color: var(--text-muted); font-size: 0.85rem; margin: 0.5rem 0 1rem; line-height: 1.4; }
.progress-bar-container { background: var(--bg-raised); border-radius: 4px; height: 6px; margin-bottom: 0.5rem; }
.progress-bar { background: var(--teal); height: 6px; border-radius: 4px; transition: width 0.3s; }
.progress-stats { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1rem; }

.continue-section, .bookmarks-section { margin-bottom: 2.5rem; }
.continue-section h2, .bookmarks-section h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }
.continue-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s;
}
.continue-card:hover { border-color: var(--teal); text-decoration: none; }
.continue-card h3 { font-size: 1rem; font-weight: 600; margin-top: 0.25rem; }

/* ── Browse ── */
.browse-layout {
    display: flex;
    min-height: calc(100vh - var(--nav-h));
    margin-top: var(--nav-h);
}
.browse-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 1.5rem 1rem;
    position: sticky;
    top: var(--nav-h);
    height: calc(100vh - var(--nav-h));
    overflow-y: auto;
}
.browse-sidebar h3 { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 1rem; }
.sidebar-level { margin-bottom: 0.25rem; }
.sidebar-level-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 7px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}
.sidebar-level-title:hover, .sidebar-level-title.active { background: var(--bg-raised); color: var(--text); text-decoration: none; }
.level-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
.sidebar-level-title.active .level-dot { background: var(--coral); }
.sidebar-categories { padding-left: 1.25rem; margin-top: 0.25rem; }
.sidebar-category {
    display: block;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.825rem;
    text-decoration: none;
}
.sidebar-category:hover, .sidebar-category.active { background: var(--bg-raised); color: var(--text); text-decoration: none; }
.sidebar-category.active { color: var(--teal); }

.browse-main { flex: 1; padding: 2rem; max-width: calc(1280px - 260px); }
.browse-header { margin-bottom: 2rem; }
.browse-header h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; }
.browse-header p { color: var(--text-muted); }

.category-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s;
    display: block;
}
.category-card:hover { border-color: var(--teal); text-decoration: none; }
.category-icon { font-size: 1.75rem; margin-bottom: 0.5rem; }
.category-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.4rem; }
.category-card p { color: var(--text-muted); font-size: 0.8rem; line-height: 1.4; margin-bottom: 0.75rem; }
.runbook-count { font-size: 0.75rem; color: var(--text-muted); }

/* ── Runbook list ── */
.runbook-list { display: flex; flex-direction: column; gap: 0.5rem; }
.runbook-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s;
}
.runbook-list-item:hover { border-color: var(--teal); text-decoration: none; }
.runbook-item-status { font-size: 1rem; flex-shrink: 0; }
.status-completed { color: var(--teal); }
.status-in_progress { color: var(--gold); }
.status-not_started { color: var(--border); }
.runbook-item-info { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; }
.runbook-title { font-weight: 500; font-size: 0.9rem; }
.runbook-description { color: var(--text-muted); font-size: 0.8rem; }
.category-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.runbook-item-meta { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.time-est { font-size: 0.75rem; color: var(--text-muted); }

/* ── Badges ── */
.difficulty-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}
.difficulty-beginner { background: var(--teal-dim); color: var(--teal); }
.difficulty-intermediate { background: var(--gold-dim); color: var(--gold); }
.difficulty-advanced { background: var(--coral-dim); color: var(--coral); }
.badge { font-size: 0.7rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 4px; }
.badge-oracle { background: var(--coral-dim); color: var(--coral); }
.badge-teal { background: var(--teal-dim); color: var(--teal); }

/* ── Breadcrumb ── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb span { color: var(--border); }

/* ── Runbook page ── */
.runbook-header { margin-bottom: 1.5rem; }
.runbook-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.runbook-title-row h1 { font-size: 1.75rem; font-weight: 700; }
.runbook-meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.meta-item { display: flex; align-items: center; gap: 0.3rem; font-size: 0.85rem; color: var(--text-muted); }
.runbook-description { color: var(--text-muted); line-height: 1.5; }

.personalised-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--teal-dim);
    border: 1px solid var(--teal);
    border-radius: 8px;
    font-size: 0.85rem;
    margin-top: 1rem;
}
.banner-amber { background: var(--gold-dim); border-color: var(--gold); }

.progress-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.status-buttons { display: flex; gap: 0.5rem; }
.btn-status {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.35rem 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    transition: all 0.15s;
}
.btn-status.active { border-color: var(--teal); color: var(--teal); background: var(--teal-dim); }
.btn-complete.active { border-color: var(--teal); color: var(--teal); background: var(--teal-dim); }

/* ── Two-column runbook layout ── */
.runbook-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    align-items: start;
}
.single-column { max-width: 800px; margin-bottom: 2.5rem; }
.platform-column {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.platform-header {
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}
.platform-oracle { background: var(--coral-dim); border-bottom-color: rgba(226,96,74,0.3); color: var(--coral); }
.platform-postgresql { background: var(--teal-dim); border-bottom-color: rgba(20,184,166,0.3); color: var(--teal); }
.platform-content { padding: 1.25rem; }
.content-context { color: var(--text-muted); font-size: 0.875rem; line-height: 1.6; margin-bottom: 1.25rem; border-left: 3px solid var(--border); padding-left: 0.75rem; }

/* ── Steps ── */
.steps { display: flex; flex-direction: column; gap: 1.5rem; }
.step { }
.step-header { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.75rem; }
.step-number {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.step-title { font-weight: 600; font-size: 0.95rem; }
.step-explanation { color: var(--text-muted); font-size: 0.85rem; line-height: 1.5; margin-top: 0.5rem; }

/* ── Code blocks ── */
.code-block-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin: 0.5rem 0;
}
.oracle-code { border-left: 3px solid var(--coral); }
.postgresql-code { border-left: 3px solid var(--teal); }
.code-block-wrapper pre {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    background: #0D1117;
}
.code-block-wrapper code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
}
.copy-btn {
    position: absolute;
    top: 0.4rem; right: 0.4rem;
    background: rgba(255,255,255,0.08);
    border: none;
    color: var(--text-muted);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.15s, color 0.15s;
    z-index: 1;
}
.copy-btn:hover { background: rgba(255,255,255,0.15); color: var(--text); }
.copy-btn.copied { color: var(--teal); }

/* ── Gotcha / hint boxes ── */
.gotcha-box {
    background: var(--gold-dim);
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 0.5rem;
}
.gotcha-box strong { color: var(--gold); }
.gotcha-tip { margin-top: 0.4rem; color: var(--text-muted); }
.hint-box {
    background: var(--teal-dim);
    border: 1px solid rgba(20,184,166,0.3);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 0.5rem;
}
.hint-box strong { color: var(--teal); display: block; margin-bottom: 0.25rem; }
.gotchas-section, .hints-section { margin-top: 1.5rem; }
.gotchas-section h3, .hints-section h3 { font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; color: var(--text-muted); }

/* ── Comparison sections ── */
.comparison-section { margin-bottom: 2.5rem; }
.comparison-section h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.25rem; }
.differences-table { display: flex; flex-direction: column; gap: 1px; background: var(--border); border-radius: 10px; overflow: hidden; }
.diff-row { display: grid; grid-template-columns: 160px 1fr 1fr 1fr; background: var(--bg-card); }
.diff-row:first-child { font-weight: 700; font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); }
.diff-topic, .diff-oracle, .diff-pg, .diff-why {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    border-right: 1px solid var(--border);
    line-height: 1.5;
}
.diff-why { border-right: none; }
.diff-topic { font-weight: 600; }
.platform-label { display: block; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.2rem; }
.oracle-label { color: var(--coral); }
.pg-label { color: var(--teal); }

.mistakes-list { display: flex; flex-direction: column; gap: 1rem; }
.mistake-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.5;
}
.mistake-title { font-weight: 600; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.4rem; }
.correct-approach { margin-top: 0.75rem; display: flex; gap: 0.4rem; color: var(--teal); align-items: flex-start; }

/* ── Notes ── */
.notes-section { margin-bottom: 2.5rem; }
.notes-section h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }
.notes-textarea {
    width: 100%;
    min-height: 120px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    resize: vertical;
    margin-bottom: 0.5rem;
}
.notes-textarea:focus { outline: none; border-color: var(--teal); }
.save-indicator { font-size: 0.8rem; color: var(--teal); margin-left: 0.75rem; }

/* ── Runbook navigation ── */
.runbook-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* ── Settings ── */
.settings-platform { margin-bottom: 3rem; }
.settings-platform-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.settings-platform-header h2 { font-size: 1.25rem; font-weight: 700; }
.env-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}
.env-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.25rem; }
.env-name-row { display: flex; align-items: center; gap: 0.75rem; }
.env-name-row h3 { font-size: 1rem; font-weight: 600; }
.env-actions { display: flex; gap: 0.5rem; }
.var-group { margin-bottom: 1.5rem; }
.var-group-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.75rem; }
.var-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0.75rem; }
.var-row { display: flex; flex-direction: column; gap: 0.25rem; }
.var-row label { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
.var-input {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    padding: 0.45rem 0.75rem;
    width: 100%;
}
.var-input:focus { outline: none; border-color: var(--teal); }
.var-help { color: var(--text-muted); cursor: help; }
.env-save-row { display: flex; align-items: center; margin-top: 1rem; }

/* ── Search ── */
.search-form { margin-bottom: 2rem; }
.search-input-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.5rem 1rem;
}
.search-input-group i { color: var(--text-muted); }
.search-input-group input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}
.results-count { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1rem; }
.empty-state { color: var(--text-muted); font-size: 0.9rem; padding: 2rem 0; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .runbook-columns { grid-template-columns: 1fr; }
    .diff-row { grid-template-columns: 1fr 1fr; }
    .diff-why { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
    .hero-title { font-size: 2.25rem; }
    .browse-sidebar { display: none; }
    .browse-main { padding: 1rem; }
    .nav-links .nav-link { display: none; }
}
