/* ── LaunchPad-AI — House Design System ─────────────────────────────── */
/* Palette: warm off-white (#F7F7F2), sage green, muted yellow. Light mode only. */
/* Typography: IBM Plex Sans (prose/headings) + JetBrains Mono (labels/badges/mono data) */

:root {
    --bg-base: #F7F7F2;
    --bg-surface: #FFFFFF;
    --bg-surface-elevated: #F1F4EE;
    --bg-surface-sunken: #EEF0E9;

    --border-subtle: #E4E9DF;
    --border-base: #DDE1D8;
    --border-strong: #D6DED2;
    --border-dark: #CFD6C9;

    --text-primary: #20231F;
    --text-secondary: #3C4139;
    --text-muted: #5B6058;
    --text-dim: #8A8F85;
    --text-faint: #A6AEA0;

    /* Sage */
    --accent-sage: #4F684F;
    --accent-sage-hover: #3F5240;
    --accent-sage-active: #2E3D2D;
    --sage-accent: #7C9A7A;
    --sage-bg: #E7EFE3;
    --sage-bg-alt: #E9F0E5;
    --sage-border: #B6C6B2;
    --sage-border-alt: #C9D8C4;
    --sage-text: #2E3D2D;
    --sage-dot: #5C8259;

    /* Yellow */
    --accent-yellow: #E8C96A;
    --yellow-bg: #FBF3D8;
    --yellow-bg-alt: #FBF4E2;
    --yellow-bg-soft: #FBF7E9;
    --yellow-border: #EADFA8;
    --yellow-border-alt: #E4D69A;
    --yellow-text: #7A6520;
    --yellow-text-alt: #8A6A1F;

    /* Muted / skip */
    --skip-bg: #EFF1EC;
    --skip-border: #D8DCD3;
    --skip-text: #6B7168;

    --font-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;

    --shadow-sm: 0 1px 2px rgba(32, 35, 31, 0.04);
    --shadow-md: 0 2px 8px rgba(32, 35, 31, 0.06);
    --shadow-lg: 0 8px 24px rgba(32, 35, 31, 0.08);

    --transition-fast: 0.15s ease;
    --transition-base: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background-color: var(--bg-base);
    background-image:
        radial-gradient(900px 500px at 82% -6%, rgba(231, 239, 227, .75), rgba(231, 239, 227, 0) 60%),
        radial-gradient(700px 420px at 4% 108%, rgba(248, 240, 201, .5), rgba(248, 240, 201, 0) 62%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

.font-mono-lp {
    font-family: var(--font-mono);
}

a {
    color: inherit;
    text-decoration: none;
}

/* ── Status Dot & Pulse ────────────────────────────────────── */
.dot-indicator {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--sage-dot);
    flex-shrink: 0;
}

.dot-indicator.pulse {
    animation: lp-pulse 2s infinite ease-in-out;
}

@keyframes lp-pulse {
    0% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(92, 130, 89, 0.55); }
    70% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 6px rgba(92, 130, 89, 0); }
    100% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(92, 130, 89, 0); }
}

/* ── Header ────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(247, 247, 242, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-base);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 11px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity var(--transition-fast);
}

.brand-logo:hover {
    opacity: 0.85;
}

.logo-mark {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    border-radius: 4px;
    background: var(--accent-sage);
    color: var(--bg-base);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
}

.brand-text {
    display: flex;
    align-items: baseline;
}

.brand-name {
    font-family: var(--font-mono);
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

.brand-name .hyphen {
    color: var(--text-faint);
}

.brand-tagline {
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 400;
}

/* Nav Tabs */
.nav-tabs {
    display: flex;
    align-items: center;
    gap: 3px;
    background: var(--bg-surface-sunken);
    padding: 3px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-base);
}

.nav-tab {
    padding: 7px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-dim);
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.nav-tab:hover {
    color: var(--text-primary);
}

.nav-tab.active {
    background: var(--bg-surface);
    border-color: var(--border-dark);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.nav-tab-pill {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 99px;
    background: var(--sage-bg);
    border: 1px solid var(--sage-border);
    color: var(--sage-text);
}

.header-status {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    background: var(--sage-bg);
    border: 1px solid var(--sage-border-alt);
}

.header-status-text {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--sage-text);
}

/* ── Observability Strip ───────────────────────────────────── */
.observability-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 32px 0;
}

.observability-strip {
    background: linear-gradient(to right, #F0F4EC, #F6F6F1 55%, #FAF6E9);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 8px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.obs-tag {
    font-size: 9.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    padding-right: 12px;
    border-right: 1px solid var(--border-dark);
}

.obs-items {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.obs-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 14px;
    border-left: 1px solid var(--border-base);
    transition: background var(--transition-fast);
    border-radius: var(--radius-sm);
}

.obs-item:first-child {
    border-left: none;
}

.obs-item:hover {
    background: rgba(255, 255, 255, 0.5);
}

.obs-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.obs-label {
    font-size: 9px;
    letter-spacing: 0.08em;
    color: var(--text-dim);
}

.obs-val {
    font-size: 9px;
    font-weight: 600;
    color: var(--sage-text);
    letter-spacing: 0.04em;
}

.obs-meta {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.obs-sync-text {
    font-size: 10.5px;
    color: var(--text-muted);
}

/* ── Page Layout ───────────────────────────────────────────── */
.page-view {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px 90px;
}

.view-content {
    animation: lp-fade-in 0.25s ease-out;
    position: relative;
}

@keyframes lp-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Typography & Monospace Labels ─────────────────────────── */
.mono-label {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 600;
}

.section-label-bar {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 24px;
}

.section-rule {
    flex: 1;
    height: 1px;
    background: var(--border-base);
}

h2 {
    letter-spacing: -0.8px;
    font-weight: 600;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-base);
    font-size: 10.5px;
    font-weight: 600;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-family: var(--font-sans);
    font-size: 14.5px;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(180deg, #5D7A5B, #4A6349);
    color: #FBFCFA;
    border-color: #445A44;
}

.btn-primary:hover {
    background: var(--accent-sage-hover);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-dark);
}

.btn-secondary:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--sage-accent);
}

.btn-connect {
    background: var(--bg-surface);
    border-color: var(--border-dark);
    color: var(--text-primary);
    font-size: 13.5px;
    padding: 8px 14px;
}

.btn-connect:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--sage-accent);
}

/* ══════════════════════════════════════════════════════════════ */
/* VIEW 1: OVERVIEW / LANDING PAGE                               */
/* ══════════════════════════════════════════════════════════════ */
.hero-section {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(400px, 0.85fr);
    gap: 56px;
    align-items: start;
    padding: 64px 0 48px;
    border-bottom: 1px solid var(--border-base);
}

.hero-kicker {
    display: inline-block;
    font-size: 10.5px;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    background: var(--bg-surface-sunken);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    margin-bottom: 22px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: -1.4px;
    color: var(--text-primary);
    margin-bottom: 18px;
}

.hero-title .accent {
    color: var(--accent-sage);
}

.hero-desc {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 22px;
    max-width: 540px;
}

.hero-flowline {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
    color: var(--sage-text);
    margin-bottom: 26px;
    max-width: 48ch;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.hero-pills {
    display: flex;
    gap: 16px;
    font-size: 11px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.hero-pills .tick {
    color: var(--accent-sage);
}

/* ── "Agent in a nutshell" interactive demo — input -> output ────────
   One card, no internal divider lines. Two asymmetric columns (small
   "you ship" input, larger "agent does" output) connected by an arrow,
   so the shape of the layout tells the story before anyone reads a word. */
.nutshell-card {
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: linear-gradient(175deg, #FFFFFF, #FBFBF6);
    box-shadow: var(--shadow-md);
    padding: 20px 18px;
}

.nutshell-eyebrow {
    display: block;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.11em;
    color: var(--sage-text);
    margin-bottom: 18px;
}

.nutshell-columns {
    display: grid;
    grid-template-columns: minmax(132px, 0.7fr) auto minmax(0, 1.7fr);
    align-items: start;
    column-gap: 12px;
}

.nutshell-col-input {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.nutshell-col-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-dim);
}

.nutshell-chips {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nutshell-chip {
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid var(--border-base);
    background: var(--bg-surface);
    color: var(--text-muted);
    text-align: left;
    transition: all var(--transition-fast);
}

.nutshell-chip:hover {
    border-color: var(--sage-accent);
}

.nutshell-chip.active {
    border-color: var(--accent-sage);
    background: var(--accent-sage);
    color: #FBFCFA;
    font-weight: 600;
}

.nutshell-work-line {
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.6;
    color: var(--text-muted);
}

.nutshell-work-line .tick {
    color: var(--accent-sage);
    margin-right: 4px;
}

.nutshell-arrow {
    align-self: center;
    font-size: 22px;
    line-height: 1;
    color: var(--accent-sage);
}

.nutshell-col-output {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.nutshell-reason {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.nutshell-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.nutshell-tiles.single {
    grid-template-columns: 1fr;
}

.nutshell-tile {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 11px;
}

.nutshell-tile-title {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.nutshell-tile-detail {
    font-family: var(--font-sans);
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--text-muted);
}

.nutshell-byproduct {
    margin: 18px 0 0;
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.6;
    color: var(--text-dim);
}

/* Below ~480px of the card's own width, stack input above output with a
   downward arrow -- a container query so this responds to the card's real
   space (it sits in a narrow hero column well before the page itself goes
   single-column), not just the viewport. */
.hero-demo-col {
    container-type: inline-size;
    container-name: nutshell;
}

@container nutshell (max-width: 360px) {
    .nutshell-columns {
        grid-template-columns: 1fr;
        row-gap: 14px;
    }

    .nutshell-arrow {
        transform: rotate(90deg);
        justify-self: center;
    }
}

/* ── 2-Step Connect Section ────────────────────────────────── */
.connect-section {
    padding: 52px 0 0;
}

.connect-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 18px;
}

.connect-card {
    background: linear-gradient(175deg, #FFFFFF, #FBFBF6);
    border: 1px solid var(--border-base);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
}

.step-num {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: #FBFCFA;
    background: var(--accent-sage);
    margin-bottom: 14px;
}

.connect-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.connect-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 20px;
    max-width: 44ch;
}

.connect-action {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.connect-hint {
    font-size: 11px;
    color: var(--text-dim);
}

.target-repo-box {
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    background: var(--bg-base);
    font-size: 13px;
    margin-bottom: 14px;
    overflow: hidden;
}

.repo-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
}

.repo-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 12px;
    color: var(--text-primary);
    padding: 6px 8px;
    font-family: var(--font-mono);
}

.repo-input::placeholder {
    color: var(--text-faint);
}

.btn-connect-action {
    background: var(--accent-sage);
    color: #FCFCF9;
    border: 1px solid var(--accent-sage-hover);
    padding: 6px 14px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
    flex-shrink: 0;
    font-family: var(--font-sans);
}

.btn-connect-action:hover {
    background: var(--accent-sage-hover);
}

.repo-connected-state {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
}

.repo-name-display {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.repo-action-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-edit-target {
    background: transparent;
    border: none;
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
    transition: color var(--transition-fast);
    font-family: var(--font-sans);
}

.btn-edit-target:hover {
    color: var(--text-primary);
}

.automerge-row {
    margin-top: 14px;
    padding: 13px 15px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-base);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.automerge-row-title {
    font-size: 12.5px;
    color: var(--text-primary);
    display: block;
    font-weight: 600;
}

.automerge-row-desc {
    font-size: 11px;
    color: var(--text-muted);
}

.automerge-save-state {
    font-size: 10.5px;
    color: var(--text-dim);
    margin-left: 10px;
}

.connect-note {
    display: flex;
    gap: 10px;
    padding: 13px 15px;
    border: 1px solid var(--yellow-border);
    border-radius: var(--radius-sm);
    background: var(--yellow-bg-soft);
    margin-top: 14px;
}

.note-badge {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--yellow-text-alt);
    flex-shrink: 0;
    padding-top: 1px;
}

.connect-note p {
    font-size: 13.5px;
    line-height: 1.55;
    color: #5E5119;
}

/* ── How It Works Flow ─────────────────────────────────────── */
.how-section {
    padding: 52px 0 0;
}

.steps-flow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
    gap: 14px;
}

.flow-step-card {
    border: 1px solid var(--border-base);
    border-top: 2px solid var(--accent-sage);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    padding: 22px 20px 24px;
}

.flow-step-card.accent-card {
    border-top-color: var(--accent-yellow);
}

.flow-step-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.flow-num {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent-sage);
}

.flow-step-card.accent-card .flow-num {
    color: var(--yellow-text-alt);
}

.flow-role-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-faint);
}

.flow-step-card h4 {
    font-size: 16.5px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.flow-step-card p {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-muted);
}

.control-banner {
    margin-top: 32px;
    padding: 16px 24px;
    background: linear-gradient(to right, #EEF1E8, #F8F5E4, #EEF1E8);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.control-tag {
    font-size: 10px;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--text-secondary);
}

.control-divider {
    width: 1px;
    height: 14px;
    background: var(--border-dark);
    flex-shrink: 0;
}

.control-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.control-item {
    font-size: 10.5px;
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════ */
/* VIEW 2: LIVE DASHBOARD                                        */
/* ══════════════════════════════════════════════════════════════ */

/* ── Interactive Auto-Merge Toggle Switch ───────────────────── */
.toggle-switch-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--border-dark);
    transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 24px;
    border: 1px solid var(--text-faint);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #FFFFFF;
    transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background-color: var(--accent-sage);
    border-color: var(--accent-sage-hover);
}

input:checked + .toggle-slider:before {
    transform: translateX(18px);
}

.toggle-label {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ── Live Agent Status Banner (light) ───────────────────────── */
.live-terminal-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-base);
    border-radius: var(--radius-md);
    margin-top: 14px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

.terminal-main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.02em;
    user-select: none;
    transition: background 0.15s ease;
}

.terminal-main-header:hover {
    background: var(--bg-surface-elevated);
}

.terminal-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-weight: 600;
}

#terminal-status-title {
    color: var(--text-primary);
}

.btn-terminal-toggle {
    background: var(--bg-surface);
    border: 1px solid var(--border-dark);
    color: var(--sage-text);
    border-radius: 4px;
    padding: 5px 11px;
    font-size: 11px;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-terminal-toggle:hover {
    background: var(--sage-bg);
    border-color: var(--sage-border);
}

.terminal-stages-collapsible {
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface-sunken);
    padding: 4px 0 0;
}

.terminal-stages-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding: 14px 18px;
}

.terminal-stage-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-base);
    border-radius: 6px;
    padding: 10px 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.25s ease;
}

.terminal-stage-item.pending {
    opacity: 0.4;
    color: var(--text-dim);
}

.terminal-stage-item.active {
    opacity: 1;
    border-color: #445A44;
    background: linear-gradient(180deg, #5D7A5B, #4A6349);
    color: #FBFCFA;
    box-shadow: 0 0 0 3px rgba(79, 104, 79, 0.22);
    animation: stagePulse 1.5s infinite;
}

.terminal-stage-item.active .stage-num {
    opacity: 0.9;
}

.terminal-stage-item.done {
    opacity: 1;
    border-color: var(--sage-border);
    background: var(--sage-bg-alt);
    color: var(--sage-text);
}

.stage-num {
    font-size: 9.5px;
    font-weight: 700;
    opacity: 0.75;
}

.stage-label {
    font-size: 11px;
    font-weight: 600;
}

@keyframes stagePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 104, 79, 0.45); }
    50% { box-shadow: 0 0 0 7px rgba(79, 104, 79, 0); }
}

/* ── Live status banner: stronger contrast while actually running ── */
.live-terminal-container.running {
    border-color: var(--sage-border);
    background: var(--sage-bg-alt);
}

.live-terminal-container.running .terminal-main-header:hover {
    background: var(--sage-bg);
}

/* ── "Latest release" header ─────────────────────────────────── */
.dash-latest-header {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
    padding: 4px 0 18px;
}

.dash-title {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.8px;
}

.dash-handled-pill {
    font-size: 10.5px;
    color: var(--text-muted);
    border: 1px solid var(--border-base);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    background: var(--bg-surface);
}

.dash-automerge-pill {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border-base);
    border-radius: var(--radius-sm);
    background: var(--bg-surface-elevated);
    font-size: 11px;
    color: var(--text-muted);
}

/* ── Empty dashboard state ──────────────────────────────────── */
.dash-empty-state {
    border: 1px solid var(--border-base);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    padding: 56px 24px;
    text-align: center;
}

.dash-empty-state h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.dash-empty-state p {
    font-size: 13.5px;
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto;
}

.dash-empty-state a {
    color: var(--accent-sage);
    font-weight: 600;
    text-decoration: underline;
}

/* ── Twin cards: Portfolio Updated / Publish Ready ──────────── */
.dash-twin-cards {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(400px, 1.15fr);
    align-items: start;
    gap: 20px;
    margin-bottom: 26px;
}

@media (max-width: 960px) {
    .dash-twin-cards {
        grid-template-columns: 1fr;
    }
}

.dash-left-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.dash-right-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.next-build-wrapper {
    width: 100%;
}

.twin-card {
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.twin-card.portfolio-card {
    border: 1px solid var(--sage-border-alt);
}

.twin-card.publish-card {
    border: 1px solid var(--yellow-border);
}

.twin-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 20px;
    border-radius: 7px 7px 0 0;
}

.twin-card.portfolio-card .twin-card-header {
    border-bottom: 1px solid var(--border-base);
    background: linear-gradient(100deg, #E9F0E5, #F6F8F3);
}

.twin-card.publish-card .twin-card-header {
    border-bottom: 1px solid var(--yellow-border);
    background: linear-gradient(100deg, #FBF4E2, #FDFBF4);
}

.twin-card-status-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: var(--bg-surface);
    border-radius: 4px;
    padding: 4px 9px;
}

.twin-card.portfolio-card .twin-card-status-pill {
    color: var(--sage-text);
    border: 1px solid var(--sage-border);
}

.twin-card.publish-card .twin-card-status-pill {
    color: var(--yellow-text-alt);
    border: 1px solid var(--yellow-border-alt);
}

.twin-card-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.twin-card.portfolio-card .twin-card-status-dot { background: var(--sage-dot); }
.twin-card.publish-card .twin-card-status-dot { background: var(--accent-yellow); }

.twin-card .twin-card-status-pill.muted {
    color: var(--skip-text);
    border: 1px solid var(--skip-border);
    background: var(--skip-bg);
}

.twin-card .twin-card-status-pill.muted .twin-card-status-dot {
    background: var(--skip-text);
}

.twin-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.twin-card-body {
    padding: 16px 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.twin-card-empty {
    padding: 6px 0 2px;
    font-size: 13px;
    color: var(--text-muted);
}

.twin-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Prominent, button-weight PR action — matches Copy Post's visual weight */
.btn-portfolio-pr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(180deg, #5D7A5B, #4A6349);
    color: #FBFCFA;
    font-weight: 600;
    font-size: 14px;
    padding: 11px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid #445A44;
    font-family: var(--font-sans);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-portfolio-pr:hover {
    background: var(--accent-sage-hover);
}

.btn-portfolio-pr.review {
    background: var(--yellow-text-alt);
    border-color: #6B5217;
}

.btn-portfolio-pr.review:hover {
    background: #6B5217;
}

.btn-pr-chip {
    font-family: var(--font-mono);
    font-size: 11.5px;
    display: inline-flex;
    align-items: center;
    padding: 11px 12px;
    border: 1px solid var(--border-base);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-secondary);
}

.btn-pr-chip:hover {
    border-color: var(--sage-accent);
}

/* Publish (post) card contents */
.post-reasoning-quote {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.6;
}

.post-body-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 14px;
}

.post-text-content {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.post-text-content[contenteditable="true"] {
    border: 1px solid var(--accent-sage) !important;
    padding: 8px;
    border-radius: 4px;
}

.post-image-box {
    border: 1px solid var(--border-base);
    border-radius: var(--radius-sm);
    height: 118px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--bg-surface-elevated);
}

.post-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-image-slot-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
}

.post-hashtags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.post-hashtag-chip {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 4px 9px;
    border-radius: 4px;
    background: var(--bg-base);
    border: 1px solid var(--border-base);
    color: var(--text-secondary);
}

.post-top-action-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 4px;
}

.post-actions-row-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.post-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}

.btn-copy-post {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(180deg, #5D7A5B, #4A6349);
    color: #FBFCFA;
    font-weight: 600;
    font-size: 14px;
    padding: 11px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid #445A44;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
    white-space: nowrap;
}

.btn-copy-post:hover {
    background: var(--accent-sage-hover);
}

.btn-copy-post.copied {
    background: var(--accent-sage-active);
}

.btn-copy-image {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: #FFFFFF;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 13.5px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
    white-space: nowrap;
}

.btn-copy-image:hover {
    border-color: var(--text-primary);
    background: var(--bg-surface-elevated);
}

.btn-edit-post {
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-dark);
    cursor: pointer;
    font-family: var(--font-sans);
    transition: all 0.2s ease;
}

.btn-edit-post:hover {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
}

.btn-edit-post.btn-save-active {
    background: var(--sage-bg);
    border-color: var(--sage-border);
    color: var(--sage-text);
    font-weight: 700;
}

.btn-reset-post {
    background: transparent;
    color: var(--skip-text);
    font-size: 11px;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-dark);
    cursor: pointer;
    font-family: var(--font-mono);
    transition: all 0.2s ease;
}

.btn-reset-post:hover {
    background: var(--bg-surface-sunken);
    color: var(--text-primary);
}

.copy-post-hint {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-dim);
    line-height: 1.5;
}

.restraint-box {
    padding: 18px 0;
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.65;
}

.restraint-box strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

/* ── Activity feed + aside ───────────────────────────────────── */
.dash-activity-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.95fr);
    gap: 26px;
    align-items: start;
}

.activity-feed-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.activity-feed-heading h2 {
    font-size: 21px;
    letter-spacing: -0.7px;
}

.activity-feed-hint {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-dim);
}

.decisions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.decision-row-item {
    border: 1px solid var(--border-base);
    border-left: 3px solid var(--accent-sage);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    transition: border-color var(--transition-fast);
}

.decision-row-item.action-update_existing,
.decision-row-item.action-update {
    border-left-color: var(--accent-yellow);
}

.decision-row-item.action-skip {
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--border-dark);
    background: var(--bg-surface-sunken);
}

.decision-row-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    width: 100%;
    padding: 16px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-sans);
}

.decision-row-time {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-dim);
    width: 64px;
    flex-shrink: 0;
    text-align: left;
}

.decision-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 4px 8px;
    border-radius: 4px;
    flex-shrink: 0;
    white-space: nowrap;
}

.badge-feature_new {
    background: var(--sage-bg);
    border: 1px solid var(--sage-border);
    color: var(--sage-text);
}

.badge-update_existing, .badge-update {
    background: var(--yellow-bg);
    border: 1px solid var(--yellow-border-alt);
    color: var(--yellow-text);
}

.badge-skip {
    background: var(--skip-bg);
    border: 1px solid var(--skip-border);
    color: var(--skip-text);
}

.decision-repo-name {
    font-family: var(--font-mono);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
}

.decision-summary-text {
    font-size: 14px;
    color: var(--text-secondary);
    flex: 1;
    min-width: 160px;
}

.decision-row-item.action-skip .decision-repo-name,
.decision-row-item.action-skip .decision-summary-text {
    color: var(--text-muted);
}

.decision-expand-toggle {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent-sage);
    flex-shrink: 0;
}

.decision-row-item.action-skip .decision-expand-toggle {
    color: var(--skip-text);
}

.decision-expand-panel {
    padding: 0 20px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.agent-narrative-box {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.75;
    color: var(--text-secondary);
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: 5px;
    padding: 12px 14px;
}

.decision-links-row {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
}

.pr-link-chip {
    font-family: var(--font-mono);
    font-size: 11.5px;
    padding: 8px 11px;
    border: 1px solid var(--border-base);
    border-radius: 5px;
    background: var(--bg-surface);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pr-link-chip:hover {
    border-color: var(--sage-accent);
}

.pr-link-chip.merged {
    color: var(--sage-text);
}

/* Empty activity feed */
.decision-log-empty {
    padding: 60px 24px;
    text-align: center;
    border: 1px solid var(--border-base);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
}

.decision-log-empty h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.decision-log-empty p {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 380px;
    margin: 0 auto;
}

.decision-log-empty a {
    color: var(--accent-sage);
    font-weight: 600;
    text-decoration: underline;
}

/* Aside byproduct footnote */
.dash-aside-col {
    position: sticky;
    top: 84px;
}

.quiet-footnote {
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: 1px solid var(--border-base);
    border-left: 3px solid var(--sage-accent);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    overflow-wrap: break-word;
}

.quiet-footnote .footnote-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--sage-text);
    margin-bottom: 6px;
}

/* ── Streaming Typewriter Cursor ─────────────────────────────── */
.typewriter-cursor {
    display: inline-block;
    color: var(--accent-sage);
    font-weight: 700;
    animation: cursorBlink 0.8s infinite;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ── Toast Notification ────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(40px);
    background: var(--text-primary);
    color: #FCFCF9;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-base);
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border-base);
    padding: 24px 32px;
    text-align: center;
}

.footer-inner {
    font-size: 11.5px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-dot {
    color: var(--border-dark);
}

/* ── Responsive Queries ────────────────────────────────────── */
@media (max-width: 900px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .dash-activity-grid {
        grid-template-columns: 1fr;
    }

    .connect-grid {
        grid-template-columns: 1fr;
    }

    .dash-aside-col {
        position: static;
    }
}

@media (max-width: 680px) {
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 16px;
        gap: 12px;
    }

    .observability-container {
        padding: 12px 16px 0;
    }

    .page-view {
        padding: 0 16px 60px;
    }

    .hero-title {
        font-size: 34px;
    }

    .terminal-stages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
