/* ============================================================================
   Hagentic — Landing hero ("Living Panels")
   Standalone page, isolated from the app. Tokens mirror the live app tone
   (the .bs-view palette) so the landing and the app interior feel like one
   product; we can warm the whole thing up later in one place.
   ========================================================================== */

.lp {
    --bg: #1A1A1E;
    --surface: #222228;
    --surface-hover: #2A2A30;
    --surface-raised: #2C2C33;
    --border: #2E2E36;
    --border-light: #38383F;
    --text: #EAEAED;
    --text-secondary: #A0A0A8;
    --text-tertiary: #6E6E76;
    --text-muted: #4E4E56;
    --accent: #C4785A;
    --accent-text: #DE9474;
    --note: #F0D26B;          /* Tile 1 — gold */
    --visual: #C490D0;        /* Tile 3 — purple */
    --branch: #6DCF97;        /* Researcher (Ada) — green */
    --knowledge: #8BA4D4;     /* Tile 4 — blue */
    --danger: #E06C75;        /* Critic (Max) — red */
    --wikilink: #5b9bd5;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
    --serif: Georgia, 'Times New Roman', serif;
}

/* Reset the page chrome too — this page doesn't load the app's stylesheet, so
   body keeps its default 8px margin + white background and shows as a frame
   around the 100vh hero. Zero it and paint it the page background. */
html, body { margin: 0; padding: 0; min-height: 100%; background: #1A1A1E; }

/* Scoped reset — only inside .lp, so nothing here can leak to the app. */
.lp, .lp *, .lp *::before, .lp *::after { box-sizing: border-box; margin: 0; padding: 0; }

.lp {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

.lp ::-webkit-scrollbar { width: 6px; height: 6px; }
.lp ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Hero layout ────────────────────────────────────────────────────────── */
.lp-hero {
    min-height: calc(100vh - 42px);   /* clear the fixed 42px top nav */
    margin-top: 42px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 48px 24px; gap: 0;
}
.lp-head { text-align: center; margin-bottom: 36px; max-width: 660px; }
.lp-headline {
    font-size: 31px; font-weight: 800; letter-spacing: -0.7px;
    line-height: 1.22; color: var(--text); margin-bottom: 12px;
}
.lp-subtitle {
    font-size: 14px; color: var(--text-muted); line-height: 1.6;
    max-width: 520px; margin: 0 auto;
}

/* ── Tiles ──────────────────────────────────────────────────────────────── */
.lp-tiles { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.lp-tile {
    width: 202px; padding: 24px 18px; border-radius: 16px;
    background: var(--surface); border: 1px solid var(--border);
    text-align: center; cursor: pointer; font-family: inherit;
    display: flex; flex-direction: column; align-items: center;
    transition: transform 0.22s ease, box-shadow 0.22s ease,
                background 0.22s ease, border-color 0.22s ease;
}
.lp-tile:hover, .lp-tile:focus-visible {
    transform: translateY(-4px);
    background: var(--surface-hover);
    box-shadow: 0 12px 32px rgba(0,0,0,0.35);
    outline: none;
}
.lp-tile:focus-visible { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--tc), 0 12px 32px rgba(0,0,0,0.35); }
.lp-tile[data-tile="build"]:hover, .lp-tile[data-tile="build"]:focus-visible { border-color: color-mix(in srgb, var(--note) 50%, transparent); }
.lp-tile[data-tile="team"]:hover,  .lp-tile[data-tile="team"]:focus-visible  { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.lp-tile[data-tile="branch"]:hover,.lp-tile[data-tile="branch"]:focus-visible{ border-color: color-mix(in srgb, var(--visual) 50%, transparent); }
.lp-tile[data-tile="wiki"]:hover,  .lp-tile[data-tile="wiki"]:focus-visible  { border-color: color-mix(in srgb, var(--knowledge) 50%, transparent); }
.lp-figure { height: 128px; display: flex; align-items: center; justify-content: center; }
.lp-tile-title { font-size: 15px; font-weight: 700; color: var(--text); margin: 12px 0 6px; }
.lp-tile-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.55; }

/* ── CTA + tip ──────────────────────────────────────────────────────────── */
.lp-cta {
    margin-top: 32px; padding: 13px 30px; border-radius: 10px; border: none;
    background: var(--accent); color: #fff; font-size: 14px; font-weight: 600;
    cursor: pointer; font-family: inherit; transition: filter 0.15s, transform 0.15s;
}
.lp-cta:hover { filter: brightness(1.08); }
.lp-cta:active { transform: translateY(1px); }
.lp-cta:disabled { opacity: 0.6; cursor: default; }
.lp-tip { font-size: 11px; color: var(--text-muted); margin-top: 16px; font-style: italic; text-align: center; }

/* ════════ Tile figures ════════ */
/* 1 — Build */
.lpf-build { width: 150px; display: flex; flex-direction: column; gap: 6px; }
.lpf-build-card { border-radius: 8px; background: var(--bg); border: 1px solid color-mix(in srgb, var(--note) 30%, transparent); padding: 8px 10px; }
.lpf-build-id { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.lpf-avatar-sm {
    width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800;
    background: color-mix(in srgb, var(--danger) 18%, transparent);
    border: 1.5px solid color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger);
}
.lpf-build-name { font-size: 10px; font-weight: 700; color: var(--text); }
.lpf-build-role { font-size: 7.5px; color: var(--text-muted); }
.lpf-bars { display: flex; gap: 3px; margin-bottom: 6px; }
.lpf-bar { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-raised); }
.lpf-bar.on { background: var(--note); }
.lpf-chips { display: flex; gap: 3px; }
.lpf-chip { font-size: 6.5px; padding: 2px 5px; border-radius: 3px; background: var(--surface-raised); color: var(--text-tertiary); }
.lpf-build-prev-label { font-size: 7px; color: var(--text-muted); margin-bottom: 3px; }
.lpf-build-prev-u { font-size: 8px; color: var(--text-secondary); background: var(--surface-raised); border-radius: 6px; padding: 4px 7px; margin-bottom: 3px; }
.lpf-build-prev-a { font-size: 8px; color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); border-radius: 6px; padding: 4px 7px; }

/* Wiki figure */
.lpf-wiki { width: 150px; height: 122px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); padding: 9px 10px; overflow: hidden; position: relative; }
.lpf-wiki-title { font-size: 9.5px; font-weight: 800; color: var(--text); margin-bottom: 1px; letter-spacing: -0.2px; }
.lpf-wiki-sub { font-size: 6.5px; color: var(--text-muted); font-style: italic; margin-bottom: 6px; border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.lpf-wiki-box { float: right; width: 40px; margin-left: 6px; margin-bottom: 4px; border-radius: 3px; background: color-mix(in srgb, var(--knowledge) 12%, transparent); border: 1px solid color-mix(in srgb, var(--knowledge) 25%, transparent); padding: 4px; }
.lpf-wiki-box-img { width: 100%; height: 15px; border-radius: 2px; background: color-mix(in srgb, var(--knowledge) 18%, transparent); margin-bottom: 3px; }
.lpf-wiki-box-line { height: 2.5px; background: var(--border); border-radius: 1px; margin-bottom: 2px; }
.lpf-skel { height: 3px; background: var(--surface-raised); border-radius: 1px; margin-bottom: 3px; }
.lpf-wiki-sec { font-size: 7px; font-weight: 700; color: var(--knowledge); margin: 5px 0 3px; padding-bottom: 2px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 3px; clear: left; }
.lpf-wiki-sec span { font-size: 6px; }

/* ════════ Animations ════════ */
@keyframes lp-debateArc { 0%,100% { opacity: 0.15; } 50% { opacity: 1; } }
@keyframes lp-growBranch { 0% { stroke-dashoffset: 60; } 55%,100% { stroke-dashoffset: 0; } }
@keyframes lp-nodePop { 0%,40% { opacity: 0; } 60%,100% { opacity: 1; } }
@keyframes lp-addPulse { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
@keyframes lp-buildIn { 0% { opacity: 0; transform: translateY(-3px); } 14% { opacity: 1; transform: translateY(0); } 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes lp-modalIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes lp-backdropIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes lp-blink { 50% { opacity: 0; } }

.lp-anim-buildIn { animation: lp-buildIn 5s ease-in-out infinite; }
.lpf-build-id      { animation: lp-buildIn 5s ease-in-out infinite; }
.lpf-bars          { animation: lp-buildIn 5s ease-in-out infinite 0.3s; }
.lpf-chips         { animation: lp-buildIn 5s ease-in-out infinite 0.5s; }
.lpf-build-prev    { animation: lp-buildIn 5s ease-in-out infinite 0.8s; }
.lpf-wiki-title    { animation: lp-buildIn 5s ease-in-out infinite; }
.lpf-wiki-sub      { animation: lp-buildIn 5s ease-in-out infinite 0.2s; }
.lpf-wiki-box      { animation: lp-buildIn 5s ease-in-out infinite 0.4s; }
.lpf-lead .lpf-skel:nth-child(1) { animation: lp-buildIn 5s ease-in-out infinite 0.5s; }
.lpf-lead .lpf-skel:nth-child(2) { animation: lp-buildIn 5s ease-in-out infinite 0.68s; }
.lpf-lead .lpf-skel:nth-child(3) { animation: lp-buildIn 5s ease-in-out infinite 0.86s; }
.lpf-wiki-sec      { animation: lp-buildIn 5s ease-in-out infinite 1.1s; }
.lpf-decisions .lpf-skel:nth-child(1) { animation: lp-buildIn 5s ease-in-out infinite 1.3s; }
.lpf-decisions .lpf-skel:nth-child(2) { animation: lp-buildIn 5s ease-in-out infinite 1.48s; }
.lpf-tag-node      { animation: lp-addPulse 2.5s ease-in-out infinite; }
.lpf-arc-1         { animation: lp-debateArc 2s ease-in-out infinite; }
.lpf-arc-2         { animation: lp-debateArc 2s ease-in-out infinite 1s; }
.lpf-grow          { animation: lp-growBranch 4s ease-in-out infinite; }
.lpf-grow-2        { animation: lp-growBranch 4s ease-in-out infinite 0.6s; }
.lpf-grow-3        { animation: lp-growBranch 4s ease-in-out infinite 1.2s; }
.lpf-pop-2         { animation: lp-nodePop 4s ease-in-out infinite 0.6s; }
.lpf-pop-3         { animation: lp-nodePop 4s ease-in-out infinite 1.2s; }

/* ════════ Modal ════════ */
.lp-backdrop {
    position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,0.6);  /* above the fixed nav (z 200) */
    display: flex; align-items: center; justify-content: center; padding: 24px;
    animation: lp-backdropIn 0.2s ease;
}
.lp-backdrop[hidden] { display: none; }
.lp-modal {
    width: 540px; max-height: 88vh; overflow: auto; border-radius: 18px;
    background: var(--surface); border: 1px solid var(--border);
    box-shadow: 0 24px 80px rgba(0,0,0,0.6); animation: lp-modalIn 0.25s ease;
}
.lp-modal-head { padding: 22px 26px 18px; border-bottom: 1px solid var(--border); position: relative; }
.lp-dots { display: flex; gap: 5px; margin-bottom: 12px; align-items: center; }
.lp-dot { width: 7px; height: 7px; border-radius: 4px; background: var(--border); border: none; padding: 0; cursor: pointer; transition: all 0.3s; }
.lp-dot.active { width: 22px; }
.lp-dots-label { font-size: 10px; color: var(--text-muted); margin-left: 6px; }
.lp-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: 6px; }
.lp-modal-title { font-size: 19px; font-weight: 800; color: var(--text); letter-spacing: -0.4px; line-height: 1.25; margin-bottom: 8px; }
.lp-modal-lead { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.lp-close {
    position: absolute; top: 14px; right: 16px; width: 28px; height: 28px;
    font-size: 18px; line-height: 1; color: var(--text-muted); cursor: pointer;
    background: none; border: none; border-radius: 7px; transition: all 0.15s;
}
.lp-close:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.lp-modal-body { padding: 20px 26px 26px; }
.lp-modal-demo > * { display: none; }
.lp-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.lp-nav-prev, .lp-nav-next {
    padding: 7px 14px; border-radius: 8px; font-size: 12px; cursor: pointer;
    font-family: inherit; transition: filter 0.15s, background 0.15s;
}
.lp-nav-prev { border: 1px solid var(--border); background: none; color: var(--text-secondary); }
.lp-nav-prev:hover { background: rgba(255,255,255,0.05); }
.lp-nav-next { border: none; color: #fff; font-weight: 600; }
.lp-nav-next:hover { filter: brightness(1.08); }
.lp-loop { font-size: 12px; color: var(--text-muted); font-style: italic; }

/* ── Per-tile color hooks (modal chrome tinted by active tile) ── */
.lp-modal[data-tile="build"]  { --tc: var(--note); }
.lp-modal[data-tile="team"]   { --tc: var(--accent); }
.lp-modal[data-tile="branch"] { --tc: var(--visual); }
.lp-modal[data-tile="wiki"]   { --tc: var(--knowledge); }
.lp-modal { border-color: color-mix(in srgb, var(--tc) 30%, transparent); }
.lp-modal-head { background: color-mix(in srgb, var(--tc) 6%, transparent); }
.lp-eyebrow { color: var(--tc); }
.lp-dot.active { background: var(--tc); }
.lp-nav-next { background: var(--tc); }

/* ════════ Shared demo bits ════════ */
.lp-msg { --t: var(--accent); margin-bottom: 12px; }
.lp-msg-head { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.lp-msg-av {
    width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 800; color: var(--t);
    background: color-mix(in srgb, var(--t) 18%, transparent);
    border: 1.5px solid color-mix(in srgb, var(--t) 35%, transparent);
}
.lp-msg-av.you { background: color-mix(in srgb, var(--accent) 20%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); color: var(--accent); }
.lp-msg-name { font-size: 11px; font-weight: 600; color: var(--t); }
.lp-msg.lp-you .lp-msg-name { color: var(--text); }
.lp-msg-role { font-size: 9px; color: var(--text-muted); }
.lp-msg-body { font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; padding-left: 27px; }
.lp-tag {
    font-weight: 600; border-radius: 5px; padding: 0 5px; color: var(--t);
    background: color-mix(in srgb, var(--t) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--t) 30%, transparent);
}
.lp-caption { margin-top: 16px; padding: 12px 14px; border-radius: 10px; font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
.lp-caption strong { color: var(--text); }

/* Demo 1 — Build */
.lp-d-card { border-radius: 10px; background: var(--bg); border: 1px solid var(--border); }
.lp-d-card.note { border-color: color-mix(in srgb, var(--note) 30%, transparent); padding: 14px 16px; margin-bottom: 12px; }
.lp-d-label { font-size: 9px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; }
.lp-d-id { display: flex; align-items: center; gap: 11px; margin: 12px 0 14px; }
.lp-d-av { width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; background: color-mix(in srgb, var(--danger) 18%, transparent); border: 1.5px solid color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.lp-d-name { font-size: 15px; font-weight: 700; color: var(--text); }
.lp-d-role { font-size: 11px; color: var(--text-muted); }
.lp-d-field { margin-bottom: 11px; }
.lp-d-field-label { font-size: 10px; font-weight: 700; color: var(--text-tertiary); margin-bottom: 4px; }
.lp-d-field-val { font-size: 12px; color: var(--text-secondary); line-height: 1.55; }
.lp-d-field-val.mono { font-family: var(--mono); background: var(--surface-raised); padding: 8px 10px; border-radius: 7px; }
.lp-d-skill-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.lp-d-skill { font-size: 11px; padding: 3px 9px; border-radius: 6px; background: color-mix(in srgb, var(--note) 10%, transparent); border: 1px solid color-mix(in srgb, var(--note) 30%, transparent); color: var(--text-secondary); }
.lp-d-preview { border-radius: 10px; background: var(--bg); border: 1px solid var(--border); overflow: hidden; }
.lp-d-preview-head { font-size: 9px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-muted); padding: 11px 15px 9px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 6px; }
.lp-d-preview-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--branch); }
.lp-d-preview-body { padding: 13px 15px 6px; }
.lp-d-composer-wrap { padding: 0 12px 12px; }
.lp-d-composer { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-light); }
.lp-d-composer-ph { flex: 1; font-size: 12.5px; color: var(--text-muted); }
.lp-d-composer-cursor { color: var(--text); animation: lp-blink 1.1s steps(1) infinite; }
.lp-d-send { padding: 7px 16px; border-radius: 8px; border: none; background: var(--note); color: #1A1A1E; font-size: 12px; font-weight: 700; font-family: inherit; display: inline-flex; align-items: center; gap: 5px; cursor: default; }

/* Demo 2 — thread */
.lp-thread { margin-left: 27px; margin-top: 2px; padding-left: 14px; border-left: 2px solid var(--border); }
.lp-thread-label { font-size: 10px; font-weight: 600; color: var(--text-tertiary); margin-bottom: 10px; display: flex; align-items: center; gap: 5px; }

/* Demo 3 — branch tree */
.lp-br-card { border-radius: 10px; background: var(--bg); border: 1px solid var(--border); padding: 12px 14px; }
.lp-br-tag { font-size: 9px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; margin-bottom: 8px; }
.lp-br-elbow-wrap { position: relative; padding-left: 34px; margin-top: 4px; }
.lp-br-elbow { position: absolute; left: 16px; top: -4px; width: 16px; height: 34px; border-left: 2px solid color-mix(in srgb, var(--visual) 70%, transparent); border-bottom: 2px solid color-mix(in srgb, var(--visual) 70%, transparent); border-bottom-left-radius: 9px; }
.lp-br-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; background: color-mix(in srgb, var(--visual) 12%, transparent); border: 1px solid color-mix(in srgb, var(--visual) 35%, transparent); font-size: 10.5px; color: var(--visual); margin-bottom: 8px; }
.lp-br-child { border-color: color-mix(in srgb, var(--visual) 40%, transparent); }
.lp-br-elbow-dashed { position: absolute; left: 16px; bottom: -2px; width: 16px; height: 18px; border-left: 2px dashed var(--border); border-bottom: 2px dashed var(--border); border-bottom-left-radius: 9px; }
.lp-br-more { margin-top: 8px; font-size: 10.5px; color: var(--text-muted); font-style: italic; }

/* Demo 4 — wiki article (serif) */
.lp-wiki { border-radius: 8px; background: #1d1d21; border: 1px solid var(--border); padding: 16px 18px; font-family: var(--serif); }
.lp-wiki-h1 { font-size: 21px; font-weight: 400; color: var(--text); line-height: 1.2; }
.lp-wiki-from { font-size: 10.5px; color: var(--text-muted); font-style: italic; padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.lp-wiki-infobox { float: right; width: 150px; margin-left: 14px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 3px; overflow: hidden; background: #222226; }
.lp-wiki-ib-title { background: color-mix(in srgb, var(--knowledge) 10%, transparent); padding: 5px 8px; text-align: center; font-size: 10.5px; font-weight: 700; color: var(--text); font-family: var(--font); }
.lp-wiki-ib-img { height: 56px; background: color-mix(in srgb, var(--knowledge) 4%, transparent); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 9px; border-bottom: 1px solid var(--border); font-family: var(--font); }
.lp-wiki-ib-row { display: flex; font-size: 9.5px; border-bottom: 1px solid var(--border); font-family: var(--font); }
.lp-wiki-ib-row:last-child { border-bottom: none; }
.lp-wiki-ib-k { width: 52px; padding: 4px 6px; font-weight: 700; color: var(--text-tertiary); background: color-mix(in srgb, var(--knowledge) 4%, transparent); }
.lp-wiki-ib-v { flex: 1; padding: 4px 6px; color: var(--text-secondary); }
.lp-wiki-lead { font-size: 13px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 14px; }
.lp-wiki-lead strong { color: var(--text); }
.lp-wiki-link { color: var(--wikilink); text-decoration: none; cursor: pointer; }
.lp-wiki-h2 { font-size: 15px; font-weight: 400; color: var(--text); padding-bottom: 3px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.lp-wiki-h2.clear { clear: both; }
.lp-wiki ul { font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; padding-left: 18px; margin-bottom: 14px; }
.lp-wiki sup { color: var(--wikilink); }
.lp-wiki-refs { font-size: 10.5px; color: var(--text-muted); line-height: 1.6; }

/* ════════ Responsive ════════ */
@media (max-width: 900px) {
    .lp-tiles { width: 430px; max-width: 100%; }      /* 2×2 grid feel via wrap */
}
@media (max-width: 600px) {
    .lp-headline { font-size: 25px; }
    .lp-tiles { width: 100%; flex-direction: column; align-items: stretch; }
    .lp-tile { width: 100%; }
    .lp-backdrop { padding: 16px; }
    .lp-modal { width: 100%; max-height: 92vh; }
}

/* ════════ Reduced motion — render final state, no loops/entrance ════════ */
@media (prefers-reduced-motion: reduce) {
    .lp * { animation: none !important; transition: none !important; }
    /* ensure buildIn elements (which end at opacity:0) stay visible */
    .lp-anim-buildIn, .lpf-build-id, .lpf-bars, .lpf-chips, .lpf-build-prev,
    .lpf-wiki-title, .lpf-wiki-sub, .lpf-wiki-box, .lpf-lead .lpf-skel,
    .lpf-wiki-sec, .lpf-decisions .lpf-skel { opacity: 1 !important; transform: none !important; }
    .lpf-arc-1, .lpf-arc-2 { opacity: 0.6 !important; }
    .lpf-grow, .lpf-grow-2, .lpf-grow-3 { stroke-dashoffset: 0 !important; }
    .lpf-pop-2, .lpf-pop-3, .lpf-tag-node { opacity: 1 !important; }
    .lp-d-composer-cursor { opacity: 1 !important; }
}

/* ════════ Connect-your-AI gate ════════ */
.lp-connect {
    width: 440px; max-width: 100%; border-radius: 18px; padding: 26px 26px 22px;
    background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    box-shadow: 0 24px 80px rgba(0,0,0,0.6); animation: lp-modalIn 0.22s ease;
}
.lp-connect-title { font-size: 19px; font-weight: 800; color: var(--text); letter-spacing: -0.3px; }
.lp-connect-sub { font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; margin: 8px 0 18px; }
.lp-connect-label { display: block; font-size: 11px; font-weight: 600; color: var(--text-tertiary); margin-bottom: 6px; }
.lp-connect-keyrow { display: flex; align-items: baseline; justify-content: space-between; margin-top: 14px; }
.lp-connect-help { font-size: 11px; color: var(--accent-text); text-decoration: none; }
.lp-connect-help:hover { text-decoration: underline; }
.lp-connect-select, .lp-connect-input {
    width: 100%; background: var(--bg); color: var(--text);
    border: 1px solid var(--border-light); border-radius: 9px;
    padding: 10px 12px; font-size: 13px; font-family: inherit;
}
.lp-connect-select { cursor: pointer; }
.lp-connect-input { letter-spacing: 0.5px; }
.lp-connect-select:focus, .lp-connect-input:focus { outline: none; border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.lp-connect-error {
    margin-top: 12px; padding: 9px 11px; border-radius: 8px; font-size: 12px; line-height: 1.5;
    color: #E6A6A6; background: color-mix(in srgb, var(--danger) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
}
.lp-connect-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.lp-connect-cancel, .lp-connect-go {
    padding: 9px 18px; border-radius: 9px; font-size: 13px; font-weight: 600;
    cursor: pointer; font-family: inherit; transition: filter 0.15s, background 0.15s;
}
.lp-connect-cancel { background: none; border: 1px solid var(--border-light); color: var(--text-secondary); }
.lp-connect-cancel:hover { background: rgba(255,255,255,0.04); }
.lp-connect-go { background: var(--accent); border: none; color: #fff; }
.lp-connect-go:hover { filter: brightness(1.08); }
.lp-connect-go:disabled { opacity: 0.6; cursor: default; }
@media (max-width: 600px) { .lp-connect { width: 100%; } }

/* ============================================================================
   Deep-dive scroll tour — passive "how it works" narrative below the hero.
   Reuses the .lp tokens; alternating text/visual rows reveal on scroll.
   ========================================================================== */
.lp-scrollcue {
    margin-top: 26px; font-size: 12px; color: var(--text-tertiary);
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
    letter-spacing: 0.2px; transition: color 0.15s;
}
.lp-scrollcue:hover { color: var(--accent-text); }
.lp-scrollcue span { display: inline-block; animation: lpt-bob 1.8s ease-in-out infinite; }
@keyframes lpt-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

.lp-tour {
    max-width: 980px; margin: 0 auto; padding: 40px 24px 100px;
    display: flex; flex-direction: column; gap: 96px;
}
.lpt-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
    opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease;
}
.lpt-row.in { opacity: 1; transform: none; }
.lpt-row.reverse .lpt-text { order: 2; }       /* visual on the left */
.lpt-row.reverse .lpt-visual { order: 1; }

.lpt-eyebrow {
    font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
    color: var(--c, var(--accent)); margin-bottom: 12px;
}
.lpt-h2 { font-size: 26px; font-weight: 800; line-height: 1.18; letter-spacing: -0.4px; color: var(--text); }
.lpt-body { font-size: 14px; line-height: 1.7; color: var(--text-secondary); margin-top: 14px; }
.lpt-body em { color: var(--text); font-style: normal; font-weight: 600; }

/* ── shared visual frame ── */
.lpt-visual { display: flex; justify-content: center; }
.lpt-card, .lpt-chat, .lpt-ground, .lpt-wiki, .lpt-curate, .lpt-ideas, .lpt-canvas {
    width: 100%; max-width: 360px; background: var(--surface);
    border: 1px solid var(--border-light); border-radius: 14px; padding: 16px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.28);
}

/* Agent card (Build) */
.lpt-card-id { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.lpt-av { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center;
    justify-content: center; font-weight: 700; font-size: 13px;
    color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.lpt-name { font-size: 14px; font-weight: 700; color: var(--text); }
.lpt-role { font-size: 11px; color: var(--text-tertiary); }
.lpt-kv { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--text-tertiary); margin-top: 10px; }
.lpt-kv > span:first-child { width: 48px; flex-shrink: 0; }
.lpt-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.lpt-chips i { font-style: normal; font-size: 10px; color: var(--text-secondary); background: var(--surface-raised);
    border: 1px solid var(--border-light); border-radius: 5px; padding: 2px 7px; }
.lpt-model { color: var(--text-secondary); }
.lpt-prompt { margin-top: 12px; font-size: 11.5px; line-height: 1.6; color: var(--text-secondary);
    font-family: var(--mono); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; }

/* Chat mocks (Test, Think together) */
.lpt-chat-head { font-size: 10.5px; color: var(--text-tertiary); display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.lpt-livedot { width: 6px; height: 6px; border-radius: 50%; background: var(--branch); box-shadow: 0 0 0 3px color-mix(in srgb, var(--branch) 18%, transparent); }
.lpt-msg { font-size: 12px; line-height: 1.55; color: var(--text-secondary); background: var(--bg);
    border: 1px solid var(--border); border-left: 2px solid var(--c, var(--border)); border-radius: 8px; padding: 8px 11px; margin-top: 8px; }
.lpt-msg:first-of-type { margin-top: 0; }
.lpt-msg b { color: var(--c, var(--text)); font-weight: 700; margin-right: 6px; }
.lpt-msg.you { --c: var(--text-tertiary); }
.lpt-msg.you b { color: var(--text); }
.lpt-tag { color: var(--c); font-weight: 600; }
.lpt-composer { margin-top: 10px; font-size: 11.5px; color: var(--text-muted); display: flex; align-items: center;
    justify-content: space-between; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.lpt-send { color: #fff; background: var(--accent); border-radius: 6px; padding: 3px 9px; font-size: 10.5px; font-weight: 600; }

/* Ground */
.lpt-doc { font-size: 12px; color: var(--text-secondary); background: var(--bg); border: 1px solid var(--border);
    border-radius: 8px; padding: 8px 11px; margin-bottom: 8px; }
.lpt-cite { font-size: 12px; line-height: 1.55; color: var(--text-secondary); background: var(--bg);
    border: 1px solid var(--border); border-left: 2px solid var(--danger); border-radius: 8px; padding: 9px 11px; margin-top: 4px; }
.lpt-cite b { margin-right: 6px; font-weight: 700; }
.lpt-cite sup { color: var(--wikilink); font-size: 9px; }

/* Canvas (creative thinking) */
.lpt-canvas { position: relative; display: flex; justify-content: center; align-items: center; min-height: 190px; }
.lpt-sticky { position: absolute; top: 14px; right: 12px; transform: rotate(4deg); font-size: 11px; font-weight: 600;
    color: #2A2A20; background: var(--note); border-radius: 4px; padding: 8px 10px; max-width: 120px; line-height: 1.35;
    box-shadow: 0 6px 16px rgba(0,0,0,0.35); }
.lpt-threadpill { position: absolute; bottom: 16px; left: 14px; font-size: 10px; color: var(--text-secondary);
    background: var(--surface-raised); border: 1px solid var(--border-light); border-radius: 999px; padding: 3px 9px; }

/* Wiki (consolidation) */
.lpt-wiki-h1 { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--text); }
.lpt-wiki-from { font-size: 10.5px; color: var(--text-tertiary); border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 10px; }
.lpt-skel { height: 7px; border-radius: 4px; background: var(--surface-raised); margin-bottom: 7px; }
.lpt-wiki-h2 { font-family: var(--serif); font-size: 13px; font-weight: 700; color: var(--knowledge); margin: 12px 0 6px; }
.lpt-wiki-list { margin: 0; padding-left: 16px; }
.lpt-wiki-list li { font-size: 11.5px; line-height: 1.6; color: var(--text-secondary); }

/* Curate */
.lpt-curate-head { font-size: 11px; color: var(--text-tertiary); margin-bottom: 10px; }
.lpt-topic { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--text);
    background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; margin-bottom: 7px; }
.lpt-topic.dim { color: var(--text-tertiary); }
.lpt-keep { font-size: 10px; font-weight: 600; color: var(--branch); }
.lpt-skip { font-size: 10px; color: var(--text-muted); }
.lpt-grounded { font-size: 11px; color: var(--accent-text); margin-top: 10px; }

/* Ideas */
.lpt-idea { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; line-height: 1.5; color: var(--text-secondary);
    background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 11px; margin-bottom: 8px; }
.lpt-idea:last-child { margin-bottom: 0; }
.lpt-idea-ic { color: var(--c); font-size: 13px; line-height: 1.3; flex-shrink: 0; }

/* Closing CTA */
.lpt-close { text-align: center; padding-top: 20px; }
.lpt-close-h { font-size: 28px; font-weight: 800; letter-spacing: -0.4px; color: var(--text); }
.lpt-close-sub { font-size: 14px; color: var(--text-secondary); margin: 12px 0 24px; }

@media (max-width: 760px) {
    .lpt-row, .lpt-row.reverse { grid-template-columns: 1fr; gap: 24px; }
    .lpt-row.reverse .lpt-text { order: 1; }
    .lpt-row.reverse .lpt-visual { order: 2; }
    .lp-tour { gap: 64px; }
    .lpt-h2 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    .lpt-row { opacity: 1; transform: none; transition: none; }
    .lp-scrollcue span { animation: none; }
}
