/* ══════════════════════════════════════════════════════════════════
   F.R.A.N.K. Neural Hub — Cyberpunk Design System
   Inspired by roboart-web.vercel.app
   ══════════════════════════════════════════════════════════════════ */

/* ── CSS Variables ───────────────────────────────────────────────── */
:root {
    --green-accent: #00FF41;
    --cyan-accent: #00fff9;
    --green: #00FF41;
    --green-dim: #00cc33;
    --green-dark: #005500;
    --green-glow: rgba(0, 255, 65, 0.5);
    --green-bg: rgba(0, 255, 65, 0.06);
    --cyan: var(--cyan-accent, #00fff9);
    --cyan-dim: #00b3b3;
    --cyan-glow: rgba(0, 255, 249, 0.4);
    --magenta: #ff00cc;
    --magenta-glow: rgba(255, 0, 204, 0.4);
    --amber: #FFD900;
    --coral: #FF6B6B;
    --purple: #B34DFF;

    --bg-deep: #050508;
    --bg: #0a0a0f;
    --bg-surface: #0d1117;
    --bg-elevated: #141820;
    --bg-card: rgba(13, 17, 23, 0.7);
    --bg-glass: rgba(13, 17, 23, 0.88);

    --border: rgba(0, 255, 65, 0.1);
    --border-bright: rgba(0, 255, 65, 0.25);
    --border-glass: rgba(0, 255, 65, 0.08);

    --text: #c8d6e5;
    --text-dim: #4a5568;
    --text-muted: #2d3748;
    --danger: #ff3333;

    --nav-height: 60px;
    --status-height: 32px;
    --content-height: calc(100vh - var(--nav-height) - var(--status-height));

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* AgentForge SaaS — Base Styles (dark mode only) */

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
    background: var(--bg-deep);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--green); }

/* ── Nav ──────────────────────────────────────────────────────── */
.af-nav {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: rgba(5, 5, 8, 0.85);
    backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: center;
    padding: 0 32px;
    z-index: 100;
    gap: 32px;
}
.af-nav-brand { display: flex; align-items: center; gap: 8px; }
.af-logo-img { width: 26px; height: 26px; object-fit: contain; }
.af-brand-text { font-weight: 700; font-size: 14px; color: var(--green); letter-spacing: 2px; }
.af-nav-links { display: flex; align-items: center; gap: 6px; }
.af-nav-link {
    color: rgba(255,255,255,0.45); font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
    padding: 7px 14px; border-radius: 6px; transition: all 0.2s ease;
    text-decoration: none; font-weight: 500;
}
.af-nav-link:hover { color: rgba(255,255,255,0.9); }
.af-nav-link.active { color: var(--green); }
.af-nav-cta {
    background: rgba(0,255,65,0.12) !important; color: var(--green) !important;
    border: 1px solid rgba(0,255,65,0.3) !important;
    border-radius: 6px !important; font-weight: 600 !important;
    padding: 7px 18px !important; letter-spacing: 0.5px !important;
    transition: all 0.2s ease !important; font-size: 11px !important;
}
.af-nav-cta:hover { background: rgba(0,255,65,0.2) !important; border-color: var(--green) !important; }
.af-nav-user { display: flex; align-items: center; gap: 10px; font-size: 11px; }

@media (max-width: 768px) {
    .af-nav-links { gap: 4px; }
    .af-nav-link { font-size: 10px; padding: 6px 8px; }
}

/* ── Burger Menu ──────────────────────────────────────────── */
.af-burger {
    background: none; border: none; cursor: pointer; padding: 8px;
    display: flex; flex-direction: column; gap: 5px; z-index: 200;
}
.af-burger span {
    display: block; width: 22px; height: 2px; background: var(--text);
    transition: all 0.3s ease; border-radius: 1px;
}
.af-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.af-burger.open span:nth-child(2) { opacity: 0; }
.af-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile/Slide Menu ────────────────────────────────────── */
.af-mobile-menu {
    position: fixed; top: var(--nav-height); right: 0; bottom: 0;
    width: 260px; background: rgba(5, 5, 8, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255,255,255,0.06);
    z-index: 99; padding: 24px;
    transform: translateX(100%);
    transition: transform 0.3s var(--ease-out-expo);
}
.af-mobile-menu.open { transform: translateX(0); }
.af-mobile-menu-links { display: flex; flex-direction: column; gap: 4px; }
.af-mobile-menu-links a {
    display: block; padding: 12px 16px; color: var(--text-dim);
    font-size: 13px; text-transform: uppercase; letter-spacing: 1px;
    border-radius: var(--radius-sm); transition: all 0.2s;
    text-decoration: none;
}
.af-mobile-menu-links a:hover { color: var(--green); background: var(--green-bg); }
.af-mobile-menu-links .af-menu-cta {
    margin-top: 12px; text-align: center;
    background: var(--green-dark); color: var(--green);
    border: 1px solid var(--green-dim); border-radius: 8px;
}

.af-user-email { color: var(--text-dim); font-size: 11px; }
.af-user-plan { color: var(--cyan); text-transform: uppercase; font-size: 10px; font-weight: 700; padding: 2px 6px; border: 1px solid var(--cyan-dim); border-radius: 4px; }

/* ── Main ─────────────────────────────────────────────────────── */
.af-main { margin-top: var(--nav-height); min-height: calc(100vh - var(--nav-height)); padding: 24px; }
.af-loading { text-align: center; padding: 60px; color: var(--text-dim); }
.af-error { text-align: center; padding: 60px; color: var(--danger); }
.af-empty { text-align: center; padding: 60px; color: var(--text-dim); }
.af-warning { background: rgba(255, 217, 0, 0.08); border: 1px solid rgba(255, 217, 0, 0.2); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; font-size: 12px; color: var(--amber); }

/* ── Buttons ──────────────────────────────────────────────────── */
.af-btn { background: var(--bg-elevated); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 16px; font-size: 12px; cursor: pointer; font-family: inherit; transition: all 0.2s; }
.af-btn:hover { border-color: var(--green); color: var(--green); }
.af-btn-primary { background: var(--green-dark); color: var(--green); border-color: var(--green-dim); }
.af-btn-primary:hover { background: var(--green-dim); color: #000; }
.af-btn-sm { padding: 4px 10px; font-size: 11px; }
.af-btn-logout { background: rgba(255,60,60,0.08); color: rgba(255,80,80,0.8); border: 1px solid rgba(255,60,60,0.2);
    border-radius: 6px; padding: 4px 12px; font-size: 11px; font-family: inherit; cursor: pointer; transition: all 0.2s; }
.af-btn-logout:hover { background: rgba(255,60,60,0.15); color: #ff4444; border-color: rgba(255,60,60,0.4); }
.af-btn-danger { background: rgba(255, 51, 51, 0.1); color: var(--danger); border-color: rgba(255, 51, 51, 0.3); }
.af-btn-danger:hover { background: rgba(255, 51, 51, 0.2); }

/* ── Inputs ───────────────────────────────────────────────────── */
.af-input, .af-textarea { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; font-family: inherit; width: 100%; outline: none; transition: border 0.2s; }
.af-input:focus, .af-textarea:focus { border-color: var(--green); }
.af-input-wide { max-width: 400px; }

/* ── Toast ────────────────────────────────────────────────────── */
.af-toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.af-toast { padding: 10px 16px; border-radius: var(--radius-sm); font-size: 12px; animation: toastIn 0.3s var(--ease-out-back); }
.af-toast-info { background: var(--bg-elevated); color: var(--text); border: 1px solid var(--border); }
.af-toast-success { background: rgba(0, 255, 65, 0.1); color: var(--green); border: 1px solid var(--green-dim); }
.af-toast-error { background: rgba(255, 51, 51, 0.1); color: var(--danger); border: 1px solid rgba(255, 51, 51, 0.3); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* ── Auth Page ────────────────────────────────────────────────── */
/* ── Auth Page ─────────────────────────────────────────────── */

.af-auth-page {
    height: calc(100vh - 48px);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
}
.af-auth-page::-webkit-scrollbar { display: none; }
body:has(.af-auth-page) { overflow: hidden; }
body:has(.af-auth-page) .af-nav { display: none; }
body:has(.af-auth-page) .af-main { margin-top: 0; }
body:has(.frank-hub) .af-nav { display: none; }
body:has(.frank-hub) .af-main { margin-top: 0; padding: 0; min-height: 100vh; }
body:has(.frank-hub) { --nav-height: 0px; --status-height: 0px; overflow: hidden; }

/* ── Card ── */
.af-auth-card {
    width: 440px;
    max-width: 100%;
    background: linear-gradient(165deg, #161628 0%, #121220 50%, #0e0e1c 100%);
    border-radius: 20px;
    padding: 28px 32px 22px;
    position: relative;
    flex: none;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.5),
        0 32px 64px rgba(0,0,0,0.3);
    animation: authFadeIn 0.3s ease both;
    will-change: transform, opacity;
}
@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Close button ── */
.af-auth-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
}
.af-auth-close:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.15);
}

/* ── Tab toggle ── */
.af-auth-tabs {
    display: inline-flex;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 3px;
    margin-bottom: 18px;
}
.af-auth-tab {
    padding: 8px 20px;
    border-radius: 17px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.3);
    text-decoration: none;
    transition: all 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1;
}
.af-auth-tab.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-weight: 600;
}
.af-auth-tab:hover:not(.active) {
    color: rgba(255,255,255,0.5);
}

/* ── Title ── */
.af-auth-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
    line-height: 1.2;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, #00FF41 50%, #00fff9 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleShimmer 4s ease-in-out infinite;
}
@keyframes titleShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ── Clerk mount ── */
.af-clerk-mount {
    min-height: 200px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Force Clerk elements to stay within bounds */
#clerk-auth-mount > *,
#clerk-auth-mount .cl-rootBox,
#clerk-auth-mount .cl-cardBox,
#clerk-auth-mount .cl-card {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* ── Terms text ── */
.af-auth-terms {
    text-align: center;
    font-size: 11px;
    color: rgba(255,255,255,0.2);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 12px 0 0;
    line-height: 1.3;
}

/* ── Fallback ── */
.af-auth-fallback {
    text-align: center;
    padding: 32px 0;
    color: rgba(255,255,255,0.4);
    font-size: 14px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .af-auth-card { margin: 0 12px; padding: 22px 18px 18px; border-radius: 18px; }
}

/* ══ Clerk Overrides ═══════════════════════════════════════════ */

/* Strip Clerk chrome */
#clerk-auth-mount .cl-rootBox,
#clerk-auth-mount .cl-card,
#clerk-auth-mount .cl-cardBox,
#clerk-auth-mount .cl-signIn-root,
#clerk-auth-mount .cl-signUp-root,
#clerk-auth-mount .cl-main,
#clerk-auth-mount .cl-formContainer {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    max-width: 100% !important;
}
#clerk-auth-mount .cl-rootBox { width: 100% !important; }
#clerk-auth-mount .cl-card { padding: 0 !important; width: 100% !important; }
#clerk-auth-mount .cl-cardBox { width: 100% !important; }
#clerk-auth-mount .cl-headerTitle,
#clerk-auth-mount .cl-headerSubtitle { display: none !important; }
#clerk-auth-mount .cl-footer { display: none !important; }

/* Reorder: form first, divider + social last */
#clerk-auth-mount .cl-main {
    display: flex !important;
    flex-direction: column !important;
}
#clerk-auth-mount .cl-socialButtonsRoot,
#clerk-auth-mount [class*="socialButtons-root"],
#clerk-auth-mount [class*="socialButtonsRoot"] {
    order: 10 !important;
}
#clerk-auth-mount .cl-dividerRow,
#clerk-auth-mount [class*="dividerRow"] {
    order: 5 !important;
}

/* Hide phone number field */
#clerk-auth-mount .cl-formField__phoneNumber,
#clerk-auth-mount [data-field-name="phoneNumber"],
#clerk-auth-mount .cl-formFieldRoot__phoneNumber {
    display: none !important;
}

/* ── Inputs ── */
#clerk-auth-mount .cl-formFieldInput {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #fff !important;
    height: 44px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 14px !important;
    border-radius: 14px !important;
    transition: all 0.2s ease !important;
    padding: 0 16px !important;
}
#clerk-auth-mount .cl-formFieldInput:focus {
    border-color: rgba(0,255,65,0.35) !important;
    box-shadow: 0 0 0 3px rgba(0,255,65,0.06) !important;
    background: rgba(255,255,255,0.06) !important;
}
#clerk-auth-mount .cl-formFieldInput::placeholder {
    color: rgba(255,255,255,0.22) !important;
}
#clerk-auth-mount .cl-formFieldLabel { display: none !important; }
#clerk-auth-mount .cl-formFieldHintText { display: none !important; }

/* Password toggle */
#clerk-auth-mount .cl-formFieldInputShowPasswordButton {
    color: rgba(255,255,255,0.2) !important;
}
#clerk-auth-mount .cl-formFieldInputShowPasswordButton:hover {
    color: rgba(255,255,255,0.5) !important;
}

/* ── Submit button — green gradient ── */
#clerk-auth-mount .cl-formButtonPrimary {
    margin-top: 14px !important;
    margin-left: 12% !important;
    margin-right: 12% !important;
    width: 76% !important;
    background: linear-gradient(135deg, #00cc33 0%, #00FF41 100%) !important;
    color: #050a05 !important;
    border: none !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    height: 44px !important;
    border-radius: 14px !important;
    letter-spacing: 0.3px !important;
    text-transform: none !important;
    box-shadow:
        0 2px 8px rgba(0,255,65,0.1),
        inset 0 1px 0 rgba(255,255,255,0.12) !important;
    transition: all 0.25s ease !important;
}
#clerk-auth-mount .cl-formButtonPrimary:hover {
    background: linear-gradient(135deg, #00dd38 0%, #33ff66 100%) !important;
    box-shadow:
        0 3px 10px rgba(0,255,65,0.14),
        inset 0 1px 0 rgba(255,255,255,0.1) !important;
    transform: translateY(-1px) !important;
}
#clerk-auth-mount .cl-formButtonPrimary:active {
    transform: translateY(0) !important;
}

/* ── Divider ── */
#clerk-auth-mount .cl-dividerLine {
    background: rgba(255,255,255,0.06) !important;
}
#clerk-auth-mount .cl-dividerText {
    color: rgba(255,255,255,0.18) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 11px !important;
    letter-spacing: 1px !important;
}

/* ── Social buttons ── */
#clerk-auth-mount .cl-socialButtonsBlockButton,
#clerk-auth-mount [class*="socialButtonsBlockButton"],
#clerk-auth-mount [class*="socialButtons"] button {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 14px !important;
    color: rgba(255,255,255,0.7) !important;
    transition: all 0.2s ease !important;
    height: 40px !important;
    max-height: 40px !important;
    min-height: unset !important;
    padding: 0 !important;
    font-size: 13px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}
#clerk-auth-mount .cl-socialButtonsBlockButton:hover,
#clerk-auth-mount [class*="socialButtonsBlockButton"]:hover,
#clerk-auth-mount [class*="socialButtons"] button:hover {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,255,255,0.18) !important;
    color: #fff !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4) !important;
    transform: translateY(-1px) !important;
}
#clerk-auth-mount .cl-socialButtonsProviderIcon,
#clerk-auth-mount [class*="socialButtonsProviderIcon"],
#clerk-auth-mount [class*="socialButtons"] button img,
#clerk-auth-mount [class*="socialButtons"] button svg {
    filter: brightness(0) invert(1) !important;
    opacity: 0.75 !important;
    width: 18px !important;
    height: 18px !important;
}
#clerk-auth-mount [class*="socialButtons"] button:hover img,
#clerk-auth-mount [class*="socialButtons"] button:hover svg,
#clerk-auth-mount [class*="socialButtonsBlockButton"]:hover [class*="ProviderIcon"] {
    opacity: 1 !important;
}


/* Links */
#clerk-auth-mount .cl-footerActionLink,
#clerk-auth-mount .cl-formResendCodeLink {
    color: #00FF41 !important;
}

/* Identity preview & OTP */
#clerk-auth-mount .cl-identityPreview {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 10px !important;
}
#clerk-auth-mount .cl-otpCodeFieldInput {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #fff !important;
    border-radius: 10px !important;
}
#clerk-auth-mount .cl-alternativeMethodsBlockButton {
    background: transparent !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    color: rgba(255,255,255,0.4) !important;
    border-radius: 10px !important;
}

/* Spacing */
#clerk-auth-mount .cl-formFieldRow { margin-bottom: 2px !important; }
#clerk-auth-mount .cl-formField { margin-bottom: 4px !important; }
#clerk-auth-mount .cl-form { gap: 2px !important; }

/* ── Pricing Page ─────────────────────────────────────────────── */
.af-pricing-page { max-width: 1000px; margin: 0 auto; text-align: center; padding: 40px 0; position: relative; }
.af-pricing-title { font-size: 32px; color: var(--green); margin-bottom: 8px; }
.af-pricing-subtitle { color: var(--text-dim); font-size: 14px; margin-bottom: 40px; }
.af-pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 48px; }
.af-pricing-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 32px 24px; text-align: left; position: relative; transition: transform 0.2s, border 0.2s; }
.af-pricing-card:hover { transform: translateY(-4px); border-color: var(--border-bright); }
.af-pricing-highlight { border-color: var(--green-dim); box-shadow: 0 0 30px rgba(0, 255, 65, 0.08); }
.af-pricing-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--green); color: #000; font-size: 10px; font-weight: 700; padding: 4px 12px; border-radius: 12px; text-transform: uppercase; }
.af-pricing-plan-name { font-size: 18px; color: var(--text); margin-bottom: 12px; }
.af-pricing-price { margin-bottom: 8px; }
.af-pricing-currency { font-size: 20px; color: var(--text-dim); vertical-align: top; }
.af-pricing-amount { font-size: 48px; font-weight: 700; color: var(--green); }
.af-pricing-period { font-size: 14px; color: var(--text-dim); }
.af-pricing-desc { color: var(--text-dim); font-size: 12px; margin-bottom: 20px; }
.af-pricing-features { list-style: none; margin-bottom: 24px; }
.af-pricing-feature { padding: 6px 0; font-size: 12px; border-bottom: 1px solid var(--border-glass); }
.af-pricing-feature::before { content: "\2713  "; color: var(--green); margin-right: 6px; }
.af-pricing-cta { width: 100%; text-align: center; }
.af-pricing-faq { text-align: left; max-width: 600px; margin: 0 auto; }
.af-pricing-faq h3 { color: var(--cyan); font-size: 14px; margin: 20px 0 8px; }
.af-pricing-faq p { color: var(--text-dim); font-size: 13px; line-height: 1.6; }

/* ── Dashboard ────────────────────────────────────────────────── */
.af-dashboard { max-width: 900px; margin: 0 auto; }
.af-dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.af-dash-header h1 { font-size: 20px; color: var(--green); }
.af-dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.af-project-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; transition: all 0.2s; display: block; }
.af-project-card:hover { border-color: var(--green-dim); transform: translateY(-2px); }
.af-project-card-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 8px; }
.af-project-card-header h3 { font-size: 14px; color: var(--text); }
.af-project-time { font-size: 11px; color: var(--text-dim); }
.af-project-desc { font-size: 12px; color: var(--text-dim); margin-bottom: 12px; line-height: 1.4; }
.af-project-stats { font-size: 11px; color: var(--text-dim); display: flex; align-items: center; gap: 12px; }
.af-progress-bar { flex: 1; height: 4px; background: var(--bg); border-radius: 2px; overflow: hidden; }
.af-progress-fill { height: 100%; background: var(--green); border-radius: 2px; transition: width 0.3s; }
.af-dash-usage { margin-top: 32px; padding: 16px; background: var(--bg-surface); border: 1px solid var(--border-glass); border-radius: var(--radius-sm); }
.af-usage-stats { display: flex; gap: 24px; font-size: 12px; color: var(--text-dim); }

/* ── Settings ─────────────────────────────────────────────────── */
.af-settings { max-width: 620px; margin: 0 auto; position: relative; padding-bottom: 40px; }

/* ── Settings page card system ── */
.afset-container { position: relative; z-index: 1; }
.afset-title { font-size: 22px; font-weight: 700; color: var(--cyan); margin-bottom: 24px;
    display: flex; align-items: center; gap: 10px; }

.afset-card { background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px; padding: 22px 24px; margin-bottom: 16px;
    backdrop-filter: blur(8px); transition: border-color 0.2s; }
.afset-card:hover { border-color: rgba(255,255,255,0.12); }
.afset-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.afset-card-head h2 { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.85); margin: 0; }
.afset-hint { font-size: 11px; color: rgba(255,255,255,0.35); margin: 0 0 10px; line-height: 1.5; }
.afset-link { color: var(--cyan); text-decoration: none; transition: color 0.2s; }
.afset-link:hover { color: #fff; text-decoration: underline; }

.afset-key-row { display: flex; gap: 10px; align-items: center; margin: 12px 0 10px; }
.afset-input { flex: 1; background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px; padding: 11px 16px; color: #fff; font-family: inherit; font-size: 13px;
    outline: none; transition: border 0.2s; }
.afset-input:focus { border-color: rgba(0,255,65,0.35); box-shadow: 0 0 0 3px rgba(0,255,65,0.06); }
.afset-btn-save { background: linear-gradient(135deg, #00cc33, #00FF41); color: #050a05; border: none;
    border-radius: 10px; padding: 11px 22px; font-size: 13px; font-weight: 700; font-family: inherit;
    cursor: pointer; transition: all 0.2s; }
.afset-btn-save:hover { filter: brightness(1.1); transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,255,65,0.2); }

.afset-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.afset-plan-badge { display: inline-block; color: var(--green); font-size: 22px; font-weight: 800;
    letter-spacing: 0.06em; margin-bottom: 12px; }
.afset-btn-outline { display: inline-block; background: none; border: 1px solid rgba(0,255,249,0.2);
    color: var(--cyan); padding: 8px 16px; border-radius: 10px; font-size: 12px;
    font-family: inherit; cursor: pointer; text-decoration: none; transition: all 0.2s; }
.afset-btn-outline:hover { background: rgba(0,255,249,0.06); border-color: rgba(0,255,249,0.4); }

.afset-usage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.afset-usage-item { background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px; padding: 10px 14px; }
.afset-usage-label { display: block; font-size: 10px; color: rgba(255,255,255,0.35);
    margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.05em; }
.afset-usage-val { font-size: 16px; font-weight: 700; color: rgba(255,255,255,0.8); }

.afset-danger { border-color: rgba(255,60,60,0.12); }
.afset-danger:hover { border-color: rgba(255,60,60,0.2); }
.afset-danger .afset-card-head h2 { color: #ff4444; }
.afset-btn-danger { background: rgba(255,60,60,0.08); border: 1px solid rgba(255,60,60,0.25);
    color: #ff4444; padding: 10px 20px; border-radius: 10px; font-size: 12px; font-family: inherit;
    cursor: pointer; transition: all 0.2s; }
.afset-btn-danger:hover { background: rgba(255,60,60,0.15); border-color: rgba(255,60,60,0.4);
    transform: translateY(-1px); }

@media (max-width: 640px) { .afset-grid-2 { grid-template-columns: 1fr; } }

/* ── Dialog ───────────────────────────────────────────────────── */
.af-dialog-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; justify-content: center; align-items: center; z-index: 200; }
.af-dialog { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 32px; max-width: 440px; width: 90%; }
.af-dialog h2 { font-size: 16px; color: var(--green); margin-bottom: 16px; }
.af-dialog .af-input, .af-dialog .af-textarea { margin-bottom: 12px; }
.af-dialog-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 16px; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .af-pricing-grid { grid-template-columns: 1fr; }
    .af-nav { padding: 0 12px; }
    .af-nav-links { display: none; }
    .af-main { padding: 16px; }
}

/* ── Project Workspace Styles (from Frank) ──────────────────── */

/* ══════════════════════════════════════════════════════════════════
   PROJECTS PAGE — Claude Code Agent with Frank peripherals
   ══════════════════════════════════════════════════════════════════ */

/* Override .page defaults — projects manages its own layout/scroll */
.page:has(.proj-page) { overflow: hidden; padding: 0; }
.proj-page { display: flex; height: 100%; overflow: hidden; }

/* ── Sidebar ──────────────────────────────────────────────────── */
.proj-sidebar { width: 200px; flex-shrink: 0; background: rgba(0,0,0,0.35);
    border-right: 1px solid rgba(255,255,255,0.06); display: flex; flex-direction: column;
    backdrop-filter: blur(12px); }
.proj-sidebar-header { display: flex; justify-content: space-between; align-items: center;
    padding: 14px 14px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.proj-sidebar-title { font-size: 11px; font-weight: 800; color: #777; letter-spacing: 0.15em; }
.proj-new-btn { background: rgba(0,255,249,0.08); border: 1px solid rgba(0,255,249,0.25);
    color: var(--cyan); width: 30px; height: 30px; font-size: 1.2rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-family: inherit;
    border-radius: 10px; transition: all 0.2s; }
.proj-new-btn:hover { background: rgba(0,255,249,0.18); box-shadow: 0 0 16px rgba(0,255,249,0.2); }
.proj-list { flex: 1; overflow-y: auto; padding: 6px 8px; }
.proj-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
    cursor: pointer; border-left: 3px solid transparent; transition: all 0.15s;
    border-radius: 8px; margin-bottom: 2px; }
.proj-item:hover { background: rgba(255,255,255,0.03); }
.proj-item.active { background: rgba(0,255,249,0.06); border-left-color: var(--cyan); }
.proj-item-dot { width: 8px; height: 8px; border-radius: 50%; background: #444;
    flex-shrink: 0; margin-top: 5px; transition: background 0.2s; }
.proj-item.active .proj-item-dot { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.proj-item-info { flex: 1; min-width: 0; }
.proj-item-name { font-size: 11px; font-weight: 600; color: #ccc;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-item.active .proj-item-name { color: #fff; }
.proj-item-meta { font-size: 9px; color: #555; margin-top: 2px; line-height: 1.3; }
.proj-progress-bar {
    width: 100%; height: 3px; background: rgba(255,255,255,0.06);
    border-radius: 3px; margin-top: 4px; overflow: hidden;
}
.proj-progress-fill {
    height: 100%; border-radius: 3px; transition: width 1.2s ease-out;
}
.proj-progress-pulse { animation: progressPulse 2s ease-in-out infinite; }
@keyframes progressPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.proj-progress-label { font-size: 9px; color: #666; margin-top: 2px; }
.proj-item-del {
    opacity: 0; font-size: 14px; color: #666; background: none; border: none;
    cursor: pointer; padding: 4px; transition: all 0.15s; margin-left: auto;
}
.proj-item:hover .proj-item-del { opacity: 0.7; }
.proj-item-del:hover { color: var(--coral); opacity: 1; }
.proj-empty-list { color: #555; font-size: 13px; padding: 30px 16px; text-align: center; }
.proj-key-status { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 11px; text-align: center; }
.key-ok { color: var(--green); letter-spacing: 0.1em; font-weight: 700; }
.proj-credit-box { text-align: center; }
.proj-credit-today { font-size: 12px; color: #888; }
.proj-credit-loading { font-size: 11px; color: #555; }
.proj-set-key-btn { background: none; border: 1px solid rgba(0,255,249,0.15);
    color: var(--cyan); padding: 8px 16px; font-size: 11px; cursor: pointer;
    font-family: inherit; border-radius: 8px; transition: all 0.2s; }
.proj-set-key-btn:hover { background: rgba(0,255,249,0.08); }

/* ── Main area ────────────────────────────────────────────────── */
.proj-main { flex: 1; overflow: hidden; padding: 0; display: flex; flex-direction: column; }

/* Welcome */
.proj-welcome { text-align: center; padding: 80px 24px 40px; flex: 1; display: flex;
    flex-direction: column; align-items: center; justify-content: center; }
.proj-welcome-title { font-size: 22px; font-weight: 900; letter-spacing: 0.08em; color: #fff; }
.proj-welcome-sub { font-size: 12px; color: #777; margin-top: 10px; max-width: 440px;
    line-height: 1.7; }
.proj-welcome-create { background: rgba(0,255,249,0.08); border: 1px solid rgba(0,255,249,0.25);
    color: var(--cyan); padding: 12px 28px; font-size: 13px; font-weight: 700;
    cursor: pointer; font-family: inherit; margin-top: 28px; border-radius: 10px;
    letter-spacing: 0.03em; transition: all 0.25s; }
.proj-welcome-create:hover { background: rgba(0,255,249,0.15);
    box-shadow: 0 4px 24px rgba(0,255,249,0.15); transform: translateY(-1px); }

/* ── Top bar ───────────────────────────────────────────────────── */
.proj-topbar { display: flex; align-items: center; gap: 10px;
    padding: 6px 14px; border-bottom: 1px solid rgba(255,255,255,0.04);
    flex-shrink: 0; background: rgba(0,0,0,0.1); }
.proj-topbar-left { flex: 1; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.proj-name { font-size: 13px; font-weight: 800; color: #eee; margin: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-topbar-stats { font-size: 9px; color: #555; white-space: nowrap; }
.proj-topbar-actions { display: flex; gap: 4px; flex-shrink: 0; }
.proj-action-btn { background: transparent; border: 1px solid rgba(255,255,255,0.05);
    color: #666; padding: 3px 10px; font-size: 10px; cursor: pointer;
    font-family: inherit; border-radius: 6px; transition: all 0.15s; white-space: nowrap; }
.proj-action-btn:hover { color: var(--cyan); border-color: rgba(0,255,249,0.15); }

/* ── Workspace ────────────────────────────────────────────────── */
.proj-workspace { display: grid; grid-template-columns: 170px 1fr; gap: 0;
    flex: 1; min-height: 0; overflow: hidden; }

/* ── Files panel ──────────────────────────────────────────────── */
.proj-files-panel { display: flex; flex-direction: column; overflow: hidden;
    background: rgba(0,0,0,0.15); border-right: 1px solid rgba(255,255,255,0.03); }
.proj-file-search { width: 100%; background: rgba(0,0,0,0.2); border: none;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: #999; padding: 6px 10px; font-size: 11px; font-family: inherit; outline: none; }
.proj-file-search:focus { background: rgba(0,0,0,0.4); }
.proj-file-search::placeholder { color: #555; }
.proj-file-search-results { border-bottom: 1px solid rgba(255,255,255,0.03); }
.proj-search-result { padding: 6px 12px; }
.proj-search-empty { color: #555; font-size: 12px; padding: 8px 12px; }
.proj-files { flex: 1; overflow-y: auto; padding: 6px; }
.proj-file-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px;
    cursor: pointer; font-size: 11px; color: #999; transition: all 0.12s;
    border-radius: 6px; }
.proj-file-item:hover { background: rgba(0,255,249,0.04); color: #ddd; }
.fi { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }
.fi-dir { color: var(--cyan); }
.fi-code { color: var(--green); }
.fi-doc { color: #999; }
.fi-data { color: #FFD900; font-weight: 700; }
.fi-img { color: #B34DFF; }
.fi-generic { color: #666; }
.proj-file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-file-size { font-size: 11px; color: #555; flex-shrink: 0; }
.proj-file-arrow { color: #555; font-size: 14px; }
.proj-files-empty { color: #555; font-size: 13px; text-align: center; padding: 30px 0; line-height: 1.6; }

/* Drop zone */
.proj-drop-zone { padding: 10px; text-align: center; font-size: 11px; color: #444;
    border-top: 1px solid rgba(255,255,255,0.03); transition: all 0.2s; flex-shrink: 0; }
.proj-drop-zone.active { color: var(--cyan); background: rgba(0,255,249,0.05);
    border-top-color: var(--cyan); }

/* File preview */
.proj-file-preview { font-size: 12px; color: #888; background: rgba(0,0,0,0.4);
    padding: 12px; margin-top: 6px; border: 1px solid rgba(255,255,255,0.04);
    border-left: 3px solid rgba(0,255,249,0.15); border-radius: 6px;
    max-height: 300px; overflow-y: auto; white-space: pre-wrap; word-break: break-all;
    font-family: 'IBM Plex Mono', 'Fira Code', monospace; line-height: 1.6; }

/* ── Chat panel ───────────────────────────────────────────────── */
.proj-chat-panel { display: flex; flex-direction: column; overflow: hidden;
    background: rgba(0,0,0,0.1); min-height: 0; }
.proj-chat-messages { flex: 1; overflow-y: auto; padding: 16px 20px; min-height: 0; }
.proj-chat-dragover { outline: 2px dashed var(--cyan); outline-offset: -4px;
    background: rgba(0,255,249,0.02); }
.proj-chat-welcome { text-align: center; padding: 50px 20px; }
.proj-chat-welcome-icon { font-size: 2rem; color: rgba(0,255,249,0.2); margin-bottom: 12px; }
.proj-chat-welcome p { font-size: 12px; color: #777; line-height: 1.7; margin: 4px 0; }
.proj-chat-welcome-hint { color: #555; font-size: 12px; }

/* Messages */
/* ── Chat Bubbles ──────────────────────────────────────────── */
.proj-msg { display: flex; gap: 6px; margin-bottom: 6px; }
.proj-msg-user { justify-content: flex-end; }
.proj-msg-avatar { width: 18px; height: 18px; display: flex; align-items: center;
    justify-content: center; font-size: 11px; flex-shrink: 0; margin-top: 2px; }
.proj-msg-user .proj-msg-avatar { color: var(--cyan); order: 2; }
.proj-msg-assistant .proj-msg-avatar { color: var(--green); }
.proj-msg-file .proj-msg-avatar { color: #FFD900; }
.proj-msg-body { flex: 1; min-width: 0; max-width: 85%;
    background: rgba(255,255,255,0.03); border-radius: 10px; padding: 6px 10px; }
.proj-msg-user .proj-msg-body { background: rgba(0,255,249,0.06);
    border-radius: 10px 10px 2px 10px; }
.proj-msg-assistant .proj-msg-body { background: rgba(255,255,255,0.03);
    border-radius: 10px 10px 10px 2px; }
.proj-msg-role { font-size: 8px; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; margin-bottom: 2px; color: #555; }
.proj-msg-user .proj-msg-role { color: rgba(0,255,249,0.5); text-align: right; }
.proj-msg-assistant .proj-msg-role { color: rgba(0,255,65,0.5); }
.proj-msg-file .proj-msg-role { color: rgba(255,217,0,0.5); }
.proj-msg-text { font-size: 11px; color: #bbb; line-height: 1.35; white-space: pre-wrap; word-break: break-word; }
.proj-msg-text br + br { display: none; }
.proj-msg-user .proj-msg-text { color: #ddd; }
.proj-msg-text strong { color: #eee; font-size: 11px; }
.proj-msg-text em { color: #aaa; }
.proj-code { background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.05);
    border-left: 2px solid rgba(0,255,249,0.15); padding: 5px 8px; margin: 4px 0;
    font-size: 10px; line-height: 1.4; overflow-x: auto; border-radius: 4px; }
.proj-code code { color: #99ccaa; font-family: 'IBM Plex Mono', monospace; font-size: 10px; }
.proj-inline-code { background: rgba(0,255,249,0.05); border: 1px solid rgba(0,255,249,0.06);
    padding: 0px 4px; font-size: 10px; color: var(--cyan);
    font-family: 'IBM Plex Mono', monospace; border-radius: 3px; }
.proj-list-item { padding-left: 8px; margin: 0; line-height: 1.3; }

/* Tool use */
.proj-tool-details { margin-bottom: 10px; }
.proj-tool-summary { font-size: 12px; color: #777; cursor: pointer; padding: 6px 12px;
    background: rgba(0,255,249,0.03); border: 1px solid rgba(0,255,249,0.08);
    border-radius: 6px; display: inline-block; user-select: none; }
.proj-tool-summary:hover { color: var(--cyan); }
.proj-tool-live { font-size: 13px; color: var(--cyan); font-family: 'IBM Plex Mono', monospace;
    animation: pulse 1s infinite; }
.proj-stream-text { min-height: 20px; }
.proj-tool-log { font-size: 12px; color: #888; background: rgba(0,0,0,0.3);
    padding: 8px 12px; margin-top: 6px; border-left: 3px solid rgba(0,255,249,0.15);
    font-family: 'IBM Plex Mono', monospace; white-space: pre-wrap; border-radius: 4px; }

/* Input */
.proj-chat-input-wrap { display: flex; gap: 6px; padding: 6px 12px;
    border-top: 1px solid rgba(255,255,255,0.04);
    background: rgba(0,0,0,0.15); flex-shrink: 0; }
.proj-chat-field { flex: 1; font-size: 12px; padding: 8px 12px; border-radius: 8px; }
.proj-chat-textarea { resize: none; min-height: 38px; max-height: calc(1.5em * 3 + 20px);
    overflow-y: auto; line-height: 1.5; font-family: inherit; scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent; }
.proj-chat-textarea::-webkit-scrollbar { width: 4px; }
.proj-chat-textarea::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
.proj-send-btn { font-size: 13px; padding: 10px 16px; min-width: 44px; border-radius: 8px;
    align-self: flex-end; }

/* ── Dialog ───────────────────────────────────────────────────── */
.proj-dialog { max-width: 460px; margin: 60px auto; background: rgba(8,8,16,0.97);
    border: 1px solid rgba(255,255,255,0.08); padding: 32px; border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.proj-dialog-icon { font-size: 2rem; color: rgba(0,255,249,0.25); margin-bottom: 10px; }
.proj-dialog h3 { font-size: 16px; color: #fff; margin: 0 0 16px; font-weight: 800; }
.proj-dialog-input { width: 100%; margin-bottom: 10px; font-size: 13px; padding: 10px 14px;
    background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.08);
    color: #ddd; font-family: inherit; outline: none; border-radius: 10px; }
.proj-dialog-input:focus { border-color: rgba(0,255,249,0.25); }
.proj-dialog-input::placeholder { color: #555; }
.proj-dialog-hint { font-size: 13px; color: #777; margin-bottom: 14px; line-height: 1.6; }
.proj-dialog-actions { display: flex; gap: 10px; margin-top: 18px; }
.proj-dialog-btn { padding: 10px 24px; font-size: 13px; border-radius: 10px; }

/* ── Traces Tab ──────────────────────────────────────────────── */
.proj-traces-list { display: flex; flex-direction: column; gap: 8px; }
.proj-trace-session { background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px; padding: 12px 16px; cursor: pointer; transition: border-color 0.2s; }
.proj-trace-session:hover { border-color: rgba(0,255,249,0.2); }
.proj-trace-header { display: flex; justify-content: space-between; align-items: center; }
.proj-trace-sid { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--cyan); }
.proj-trace-meta { font-size: 11px; color: #777; }
.proj-trace-stats { display: flex; gap: 16px; margin-top: 6px; font-size: 11px; color: #888; flex-wrap: wrap; }
.proj-trace-details { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.04); }
.proj-trace-event { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; font-size: 11px;
    color: #999; flex-wrap: wrap; border-bottom: 1px solid rgba(255,255,255,0.02); }
.proj-trace-icon { font-size: 13px; width: 18px; text-align: center; flex-shrink: 0; }
.proj-trace-iter { color: #555; font-family: 'IBM Plex Mono', monospace; width: 24px; flex-shrink: 0; }
.proj-trace-type { color: #aaa; min-width: 70px; }
.proj-trace-model { color: var(--cyan); font-size: 10px; background: rgba(0,255,249,0.08);
    padding: 1px 6px; border-radius: 4px; }
.proj-trace-tool { color: #c77dff; font-family: 'IBM Plex Mono', monospace; }
.proj-trace-timing { color: #666; }
.proj-trace-tokens { color: #777; }
.proj-trace-cost { color: var(--green); }
.proj-trace-preview { width: 100%; color: #555; font-size: 10px; margin-top: 2px;
    font-family: 'IBM Plex Mono', monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-trace-api_call .proj-trace-type { color: var(--cyan); }
.proj-trace-tool_exec .proj-trace-type { color: #c77dff; }
.proj-trace-reflection .proj-trace-type { color: #ffb86c; }
.proj-trace-loop_warning .proj-trace-type { color: #ff5555; }
.proj-trace-approval .proj-trace-type { color: var(--green); }

/* ── Agent Status Bar (compact single line) ──────────────────── */
.proj-agent-status { padding: 3px 16px; background: rgba(0,0,0,0.15);
    border-bottom: 1px solid rgba(255,255,255,0.03); flex-shrink: 0; overflow: hidden; }
.proj-status-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.proj-status-indicator { display: flex; align-items: center; gap: 4px; }
.proj-status-icon { font-size: 10px; }
.proj-status-text { font-size: 10px; color: #777; }
.proj-status-active .proj-status-text { color: var(--green); }
.proj-status-active .proj-status-icon,
.proj-status-running .proj-status-icon { animation: pulse 2s infinite; }
.proj-status-running .proj-status-text { color: var(--cyan); }
.proj-status-paused .proj-status-text { color: #ffb86c; }
.proj-status-warning .proj-status-text { color: #ff5555; }
.proj-status-idle .proj-status-text { color: #555; }
.proj-status-metrics { display: flex; gap: 8px; flex-wrap: nowrap; overflow: hidden; }
.proj-status-metric { font-size: 9px; color: #555; white-space: nowrap; }
.proj-status-loading { font-size: 9px; color: #444; }
.proj-status-activity { display: none; }
.proj-status-activity-item { display: none; }

/* ── Memory Items ────────────────────────────────────────────── */
.memory-item { background: rgba(0,0,0,0.15); border: 1px solid rgba(255,255,255,0.04);
    border-radius: 6px; padding: 8px 10px; margin-bottom: 4px; }
.memory-internal { opacity: 0.5; }
.memory-key { font-size: 11px; color: var(--cyan); font-family: 'IBM Plex Mono', monospace; font-weight: 600; }
.memory-value { font-size: 11px; color: #999; margin: 2px 0; line-height: 1.4;
    max-height: 40px; overflow: hidden; text-overflow: ellipsis; }
.memory-meta { font-size: 9px; color: #555; display: flex; gap: 12px; }

/* ── Activity Feed (single scrollable line) ──────────────────── */
.proj-activity-feed { display: flex; gap: 8px; overflow-x: auto; margin-top: 2px;
    scrollbar-width: none; white-space: nowrap; }
.proj-activity-feed::-webkit-scrollbar { display: none; }
.activity-item { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px;
    font-size: 9px; color: #666; border-left: 2px solid #333; flex-shrink: 0; }
.activity-icon { font-size: 11px; flex-shrink: 0; }
.activity-event { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-ago { color: #555; flex-shrink: 0; font-size: 9px; }
@keyframes activityFadeIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

/* ── Skill Hotbar (compact) ───────────────────────────────────── */
.proj-skill-bar { flex-shrink: 0; border-top: 1px solid rgba(255,255,255,0.03);
    background: rgba(0,0,0,0.1); padding: 3px 12px; }
.skill-bar-scroll { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
    align-items: center; }
.skill-bar-scroll::-webkit-scrollbar { display: none; }
.skill-chip { display: flex; align-items: center; gap: 3px; padding: 2px 8px;
    border-radius: 10px; font-size: 10px; cursor: pointer; white-space: nowrap;
    transition: all 0.15s; border: 1px solid rgba(255,255,255,0.04);
    background: transparent; color: #666; flex-shrink: 0; }
.skill-chip:hover { background: rgba(255,255,255,0.06); color: #ccc; }
.skill-builtin { color: var(--chip-color, #666); }
.skill-builtin:hover { background: color-mix(in srgb, var(--chip-color, #888) 10%, transparent); }
.skill-chip-icon { font-size: 11px; line-height: 1; }
.skill-chip-label { font-weight: 600; font-size: 9px; letter-spacing: 0.02em; }
.skill-project, .skill-global { opacity: 0.6; }
.skill-project:hover, .skill-global:hover { opacity: 1; }
.skill-add { border-style: dashed; color: #444; padding: 2px 6px; }
.skill-add:hover { color: var(--cyan); }
.skill-add .skill-chip-icon { font-size: 12px; }

/* ── Approval Dialog (Human-in-the-loop) ────────────────────── */
.proj-approval-dialog { background: rgba(0,255,249,0.03); border: 1px solid rgba(0,255,249,0.15);
    border-radius: 12px; padding: 16px; margin: 8px 0; }
.proj-approval-icon { font-size: 24px; margin-bottom: 8px; }
.proj-approval-q { font-size: 14px; color: #eee; margin-bottom: 12px; line-height: 1.5; }
.proj-approval-opts { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.proj-approval-opt { padding: 8px 16px; font-size: 12px; border-radius: 8px;
    background: rgba(0,255,249,0.08); border: 1px solid rgba(0,255,249,0.2);
    color: var(--cyan); cursor: pointer; transition: all 0.2s; }
.proj-approval-opt:hover { background: rgba(0,255,249,0.15); border-color: var(--cyan); }
.proj-approval-input-wrap { display: flex; gap: 8px; }
.proj-approval-input { flex: 1; font-size: 13px; padding: 8px 12px; border-radius: 8px; }
.proj-approval-submit { font-size: 12px; padding: 8px 16px; border-radius: 8px; }

/* ── World Model Tab ─────────────────────────────────────────── */
.world-graph-container { background: rgba(0,0,0,0.2); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.world-mermaid { overflow-x: auto; }
.world-mermaid pre { font-size: 11px; color: #888; white-space: pre-wrap; }
.world-goal-card { background: rgba(0,0,0,0.15); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px; padding: 10px 12px; margin-bottom: 6px; }
.world-goal-header { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.world-goal-horizon { font-size: 9px; background: rgba(0,255,249,0.1); color: var(--cyan);
    padding: 1px 6px; border-radius: 4px; text-transform: uppercase; font-weight: 700; }
.world-goal-text { font-size: 12px; color: #ccc; }
.world-goal-progress { display: flex; align-items: center; gap: 8px; font-size: 10px; color: #888; }
.world-goal-bar { flex: 1; height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.world-goal-fill { height: 100%; background: var(--green); border-radius: 2px; transition: width 0.3s; }
.world-goal-strategy { font-size: 10px; color: #666; margin-top: 4px; font-style: italic; }
.world-entity-card { display: flex; gap: 8px; align-items: center; padding: 4px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 11px; }
.world-entity-type { color: var(--cyan); min-width: 70px; font-size: 9px;
    background: rgba(0,255,249,0.06); padding: 1px 5px; border-radius: 3px; text-align: center; }
.world-entity-name { color: #bbb; flex: 1; }
.world-entity-conf { color: #ffb86c; font-size: 9px; }

/* ── DAG Graph Visualization ────────────────────────────────── */
.dag-graph { display: flex; flex-direction: column; gap: 2px; }
.dag-layer { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.dag-layer-label { font-size: 9px; color: #444; min-width: 45px; padding-top: 10px;
    font-family: 'IBM Plex Mono', monospace; }
.dag-layer-nodes { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.dag-node { background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px; padding: 8px 10px; min-width: 180px; max-width: 280px;
    transition: border-color 0.2s, transform 0.15s; cursor: default; }
.dag-node:hover { border-color: rgba(255,255,255,0.15); transform: translateY(-1px); }
.dag-node-completed { border-color: rgba(0,200,122,0.2); background: rgba(0,200,122,0.03); }
.dag-node-in_progress { border-color: rgba(0,255,249,0.3); background: rgba(0,255,249,0.03);
    box-shadow: 0 0 8px rgba(0,255,249,0.08); }
.dag-node-blocked { border-color: rgba(255,85,85,0.2); opacity: 0.6; }
.dag-node-header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.dag-node-icon { font-size: 12px; }
.dag-node-id { font-size: 9px; color: #666; font-family: 'IBM Plex Mono', monospace; }
.dag-node-pri { font-size: 9px; color: #ffb86c; margin-left: auto;
    background: rgba(255,184,108,0.1); padding: 1px 5px; border-radius: 4px; }
.dag-node-subject { font-size: 11px; color: #bbb; line-height: 1.4; margin-bottom: 4px; }
.dag-node-deps { font-size: 9px; color: #666; margin-bottom: 4px; }
.dag-dep-chip { background: rgba(199,125,255,0.08); padding: 1px 5px; border-radius: 3px;
    color: #c77dff; margin-right: 3px; display: inline-block; }
.dag-dep-done { color: var(--green); background: rgba(0,200,122,0.08);
    text-decoration: line-through; opacity: 0.6; }
.dag-node-actions { display: flex; gap: 4px; }
.dag-status-select { font-size: 10px; background: rgba(0,0,0,0.3); color: #aaa;
    border: 1px solid rgba(255,255,255,0.08); border-radius: 4px; padding: 2px 4px;
    cursor: pointer; outline: none; }
.dag-status-select:hover { border-color: rgba(0,255,249,0.3); }

/* ── Task List (compact) ──────────────────────────────────── */
.proj-task-deps { font-size: 9px; color: #666; }
.proj-task-deps span { background: rgba(199,125,255,0.08); padding: 1px 5px; border-radius: 3px;
    color: #c77dff; margin-right: 3px; }
.proj-task-priority { font-size: 10px; color: #ffb86c; margin-left: 8px; }

@media (max-width: 768px) {
    .proj-page { flex-direction: column; }
    .proj-sidebar { width: 100%; height: auto; max-height: 120px; }
    .proj-workspace { grid-template-columns: 1fr; }
    .proj-files-panel { max-height: 120px; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.04); }
    .onboard-templates { grid-template-columns: 1fr; }
}

/* ── Onboarding Templates ────────────────────── */
.onboard-templates {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px;
}
.onboard-tpl {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    background: rgba(0,255,249,0.03); border: 1px solid rgba(0,255,249,0.1);
    border-radius: 10px; cursor: pointer; transition: all 0.2s;
}
.onboard-tpl:hover { background: rgba(0,255,249,0.08); border-color: var(--cyan);
    transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,255,249,0.1); }
.onboard-tpl-icon { font-size: 24px; }
.onboard-tpl-label { font-size: 12px; font-weight: 600; color: #eee; }
.onboard-tpl-desc { font-size: 11px; color: #777; margin-top: 2px; }

/* ── Project Tabs ────────────────────────────── */
.proj-tab-bar {
    display: flex; gap: 0; border-bottom: 1px solid rgba(255,255,255,0.04);
    padding: 0 12px; overflow-x: auto; flex-shrink: 0; scrollbar-width: none;
}
.proj-tab-bar::-webkit-scrollbar { display: none; }
.proj-tab {
    padding: 5px 12px; font-size: 10px; color: #666; background: none; border: none;
    border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
    text-transform: uppercase; letter-spacing: 0.3px; transition: all 0.15s;
}
.proj-tab:hover { color: #bbb; }
.proj-tab-active { color: var(--cyan); border-bottom-color: var(--cyan); }

/* ── Task Board ──────────────────────────────── */
.proj-task-list { display: flex; flex-direction: column; gap: 6px; }
.proj-task-item {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px;
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px; font-size: 13px; transition: all 0.15s;
}
.proj-task-item:hover { border-color: rgba(0,255,249,0.15); background: rgba(255,255,255,0.03); }
.proj-task-completed { opacity: 0.5; }
.proj-task-icon { font-size: 16px; width: 20px; text-align: center; }
.proj-task-id { font-size: 11px; color: #777; min-width: 28px; font-family: monospace; }
.proj-task-subject { flex: 1; color: #ccc; }
.proj-task-status { font-size: 10px; padding: 3px 10px; border-radius: 8px; background: rgba(255,255,255,0.05); text-transform: uppercase; letter-spacing: 0.3px; }

/* ── Hypothesis Cards ────────────────────────── */
.proj-hyp-card {
    background: rgba(255,217,0,0.03); border: 1px solid rgba(255,217,0,0.12);
    border-radius: 10px; padding: 14px 16px; margin-bottom: 8px;
}
.proj-hyp-text { font-size: 14px; color: #ccc; line-height: 1.6; margin-bottom: 8px; }
.proj-hyp-meta { display: flex; gap: 14px; font-size: 12px; }
.proj-hyp-status { text-transform: uppercase; font-weight: 600; letter-spacing: 0.3px; }
.proj-hyp-conf { color: #999; }

/* ── Streaming Text ──────────────────────────── */
.onboard-stream { line-height: 1.6; }
.mk-stream-text { line-height: 1.6; }

/* ── Budget ───────────────────────────────────── */
.budget-card {
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px; padding: 14px 20px; min-width: 130px;
}
.budget-card-main {
    background: rgba(0,255,65,0.04); border-color: rgba(0,255,65,0.15);
}
.budget-card-label { font-size: 9px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.budget-card-value { font-size: 22px; font-weight: 700; color: #eee; margin-top: 2px; }
.budget-card-main .budget-card-value { color: var(--green); }
.budget-card-value small { font-size: 11px; color: #666; font-weight: 400; }
.budget-popup-box {
    background: rgba(0,0,0,0.6); border: 1px solid rgba(0,255,65,0.2);
    border-radius: 10px; padding: 18px; max-width: 420px; margin-bottom: 16px;
    backdrop-filter: blur(8px);
}
.budget-tx {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 11px;
}
.budget-tx-pending { background: rgba(255,217,0,0.03); border-left: 3px solid var(--amber); }
.budget-tx-icon { font-size: 14px; width: 20px; text-align: center; }
.budget-tx-info { flex: 1; min-width: 0; }
.budget-tx-desc { color: #bbb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.budget-tx-meta { font-size: 9px; color: #555; }
.budget-tx-amount { font-weight: 600; min-width: 60px; text-align: right; }
.budget-tx-status {
    font-size: 8px; padding: 2px 6px; border-radius: 6px;
    background: rgba(255,255,255,0.04); color: #666; text-transform: uppercase; min-width: 50px; text-align: center;
}
.budget-tx-s-completed .budget-tx-status { color: var(--green); background: rgba(0,255,65,0.08); }
.budget-tx-s-approved .budget-tx-status { color: var(--cyan); background: rgba(0,255,249,0.08); }
.budget-tx-s-rejected .budget-tx-status { color: var(--coral); background: rgba(255,107,107,0.08); }
.budget-tx-s-pending .budget-tx-status { color: var(--amber); background: rgba(255,217,0,0.08); }
.budget-tx-actions { display: flex; gap: 4px; }

/* ── Heartbeat Cards ──────────────────────────── */
.hb-card {
    background: rgba(199,125,255,0.04); border: 1px solid rgba(199,125,255,0.15);
    border-radius: 10px; padding: 14px 16px; width: 300px; transition: all 0.2s;
}
.hb-card.hb-inactive { opacity: 0.5; border-color: rgba(255,255,255,0.05); }
.hb-card:hover { border-color: rgba(199,125,255,0.4); }
.hb-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.hb-name { font-size: 12px; font-weight: 600; color: #c77dff; }
.hb-status { font-size: 10px; padding: 3px 10px; border-radius: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.hb-on { background: rgba(0,255,65,0.12); color: var(--green); }
.hb-off { background: rgba(255,255,255,0.05); color: #666; }
.hb-schedule { font-size: 10px; color: var(--cyan); margin-bottom: 6px; font-family: monospace; }
.hb-task { font-size: 10px; color: #999; line-height: 1.4; margin-bottom: 6px; }
.hb-last { font-size: 9px; color: #666; margin-bottom: 6px; font-style: italic; }
.hb-runs { font-size: 9px; color: #555; text-align: right; }
.hb-card-actions { display: flex; gap: 4px; margin-bottom: 4px; }
.hb-btn {
    font-size: 9px; padding: 3px 8px; border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03); color: #aaa; border-radius: 4px; cursor: pointer;
}
.hb-btn:hover { background: rgba(199,125,255,0.1); color: #c77dff; border-color: rgba(199,125,255,0.3); }
.hb-btn.hb-del:hover { color: var(--coral); border-color: rgba(255,107,107,0.3); }
.hb-preset {
    font-size: 9px; padding: 4px 10px; border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02); color: #888; border-radius: 4px; cursor: pointer;
}
.hb-preset:hover { border-color: rgba(199,125,255,0.3); color: #c77dff; }
.hb-preset-sel { background: rgba(199,125,255,0.12); border-color: #c77dff; color: #c77dff; }

/* ── Marketing Assistant (Split: Panel + Chat) ─── */
.mk-split {
    flex: 1; display: flex; overflow: hidden;
}
.mk-panel {
    width: 250px; min-width: 220px; overflow-y: auto; padding: 14px;
    border-right: 1px solid rgba(255,255,255,0.05); background: rgba(0,0,0,0.15);
    flex-shrink: 0;
}
.mk-panel-section { margin-bottom: 16px; }
.mk-panel-title {
    font-size: 12px; color: #00c87a; text-transform: uppercase; letter-spacing: 0.4px;
    font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.mk-badge {
    font-size: 10px; background: rgba(0,200,122,0.15); color: #00c87a;
    padding: 2px 8px; border-radius: 8px; font-weight: 600;
}
.mk-panel-item {
    display: flex; align-items: center; gap: 8px; padding: 6px 8px;
    border-radius: 6px; font-size: 12px; cursor: default;
}
.mk-panel-item:hover { background: rgba(255,255,255,0.03); }
.mk-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.mk-dot-on { background: #00ff41; box-shadow: 0 0 4px #00ff41; }
.mk-dot-off { background: #555; }
.mk-dot-sched { background: var(--cyan); box-shadow: 0 0 4px var(--cyan); }
.mk-panel-text { flex: 1; color: #bbb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-panel-sub { font-size: 11px; color: #666; }
.mk-panel-status { font-size: 10px; color: #999; text-transform: uppercase; }
.mk-panel-empty { font-size: 12px; color: #555; padding: 6px 8px; font-style: italic; }
.mk-panel-refresh {
    width: 100%; font-size: 11px; padding: 8px; background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06); color: #777; border-radius: 8px;
    cursor: pointer; margin-top: 10px;
}
.mk-panel-refresh:hover { color: var(--cyan); border-color: rgba(0,255,249,0.15); }
.mk-assistant {
    flex: 1; display: flex; flex-direction: column; overflow: hidden;
}
.mk-chat-messages {
    flex: 1; overflow-y: auto; padding: 16px;
}
.mk-chat-input-wrap {
    display: flex; gap: 6px; padding: 10px 16px; border-top: 1px solid rgba(255,255,255,0.04);
    background: rgba(0,0,0,0.2);
}
.mk-chat-field { flex: 1; font-size: 13px; padding: 10px 14px; border-radius: 8px; }
.mk-send-btn { padding: 12px 18px; font-size: 14px; border-radius: 10px; }
.mk-action-bar { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.mk-action-btn {
    font-size: 11px; padding: 7px 14px; background: rgba(0,200,122,0.08);
    border: 1px solid rgba(0,200,122,0.2); color: #00c87a; border-radius: 8px;
    cursor: pointer; transition: all 0.15s;
}
.mk-action-btn:hover { background: rgba(0,200,122,0.15); border-color: #00c87a; }
.mk-section-title { font-size: 12px; color: #00c87a; margin: 0 0 10px; font-weight: 600; }
@media (max-width: 768px) {
    .mk-split { flex-direction: column; }
    .mk-panel { width: 100%; max-height: 150px; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.04); }
}

/* ══════════════════════════════════════════════════════════════════
   FEED PAGE — Neural-ranked RSS aggregation
   ══════════════════════════════════════════════════════════════════ */

.feed-page { max-width: 900px; margin: 0 auto; padding: 0 16px; }
.feed-header { text-align: center; padding: 30px 0 16px; }
.feed-title { font-size: 1.4rem; font-weight: 900; letter-spacing: 0.12em; color: #fff; margin: 0; }
.feed-subtitle { font-size: 0.5rem; color: #444; letter-spacing: 0.15em; margin-top: 3px; }

/* Topic buttons grid */
.feed-topics-grid { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
    padding: 12px 0 16px; max-width: 760px; margin: 0 auto; }

.feed-topic-btn { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06);
    color: #555; padding: 6px 14px; font-size: 0.62rem; font-weight: 600;
    letter-spacing: 0.04em; cursor: pointer; font-family: inherit;
    border-radius: 2px; transition: all 0.25s ease; position: relative; overflow: hidden; }

.feed-topic-btn:hover { color: #aaa; border-color: rgba(255,255,255,0.15);
    transform: translateY(-1px); }

.feed-topic-btn.active {
    color: var(--topic-color, var(--cyan));
    border-color: var(--topic-color, var(--cyan));
    background: color-mix(in srgb, var(--topic-color, var(--cyan)) 8%, transparent);
    box-shadow: 0 0 12px color-mix(in srgb, var(--topic-color, var(--cyan)) 15%, transparent);
    transform: translateY(-1px);
}

.feed-topic-btn.active::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
    background: var(--topic-color, var(--cyan));
    animation: feed-glow 2s ease infinite;
}

@keyframes feed-glow { 0%,100% { opacity: 0.6; } 50% { opacity: 1; } }

/* Controls bar */
.feed-controls { display: flex; align-items: center; gap: 8px; padding: 8px 0 16px;
    border-bottom: 1px solid rgba(0,255,249,0.05); margin-bottom: 12px; }
.feed-refresh-btn { font-size: 0.7rem; padding: 8px 20px; }
.feed-auto-btn { font-size: 0.6rem; padding: 6px 14px; transition: all 0.2s; }
.feed-auto-btn.active { color: var(--green); border-color: rgba(0,255,65,0.3);
    background: rgba(0,255,65,0.06); }
.feed-count { font-size: 0.55rem; color: #444; margin-left: auto; letter-spacing: 0.05em; }

/* Feed items list */
.feed-items-list { display: flex; flex-direction: column; gap: 2px; }

.feed-item { display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px; background: rgba(255,255,255,0.015);
    border-left: 2px solid transparent; transition: all 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.02); }
.feed-item:hover { background: rgba(255,255,255,0.03); }

.feed-item-main { flex: 1; min-width: 0; }
.feed-item-topic { font-size: 0.48rem; font-weight: 800; letter-spacing: 0.12em;
    text-transform: uppercase; display: block; margin-bottom: 2px; }
.feed-item-title { font-size: 0.78rem; font-weight: 600; color: #ccc;
    text-decoration: none; display: block; line-height: 1.35;
    transition: color 0.15s; }
.feed-item-title:hover { color: var(--cyan); }
.feed-item-meta { font-size: 0.5rem; color: #444; margin-top: 3px; display: block; }

.feed-dismiss-btn { background: none; border: none; color: #333; font-size: 1rem;
    cursor: pointer; padding: 2px 6px; line-height: 1; flex-shrink: 0;
    transition: color 0.15s; }
.feed-dismiss-btn:hover { color: #ff5555; }

.feed-empty { color: #444; font-size: 0.65rem; text-align: center; padding: 40px 0; }


/* ══════════════════════════════════════════════════════════════════
   NEWS INTELLIGENCE PAGE
   ══════════════════════════════════════════════════════════════════ */

.news-page { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.news-title { font-size: 1.6rem; font-weight: 900; letter-spacing: 0.12em; color: #fff; margin: 0; }
.news-subtitle { font-size: 0.55rem; color: #555; letter-spacing: 0.15em; margin-top: 4px; }
.accent-cyan { color: var(--cyan); }

/* Search Hero */
.news-search-hero { text-align: center; padding: 40px 0 16px; }
.news-search-bar { display: flex; gap: 8px; max-width: 640px; margin: 24px auto 0; }
.news-search-input-wrap { flex: 1; position: relative; }
.news-search-field { width: 100%; font-size: 0.85rem; padding: 12px 16px; border-radius: 2px;
    border: 1px solid rgba(0,255,249,0.12); background: rgba(10,10,18,0.95); color: #ddd;
    font-family: inherit; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.news-search-field:focus { border-color: var(--cyan); box-shadow: 0 0 20px rgba(0,255,249,0.06); }
.news-search-field::placeholder { color: #444; }
.news-search-dropdown { position: absolute; top: 100%; left: 0; right: 0; z-index: 100;
    max-height: 400px; overflow-y: auto; background: #0a0a12; border: 1px solid rgba(0,255,249,0.12);
    border-top: none; }
.news-go-btn { padding: 12px 28px; font-size: 0.75rem; font-weight: 800;
    letter-spacing: 0.12em; white-space: nowrap; border-radius: 2px; }
.news-go-btn:disabled { opacity: 0.25; cursor: not-allowed; }

/* Selected entity chip */
.news-selected { margin-top: 8px; }
.news-selected-chip { display: inline-flex; align-items: center; gap: 6px;
    background: rgba(0,255,249,0.05); border: 1px solid rgba(0,255,249,0.15);
    padding: 5px 12px; font-size: 0.7rem; color: var(--cyan); border-radius: 2px; }
.chip-x { background: none; border: none; color: #666; cursor: pointer;
    font-size: 0.9rem; padding: 0 2px; line-height: 1; }
.chip-x:hover { color: #ff5555; }

/* Synthesis status */
.news-status { margin-top: 4px; font-size: 0.65rem; }
.pulse-cyan { color: var(--cyan); animation: pulse 1.5s infinite; }

/* Archive section */
.news-archive-section { margin-top: 20px; border-top: 1px solid rgba(0,255,249,0.05);
    padding-top: 14px; }
.news-archive-title { font-size: 0.65rem; font-weight: 800; color: #444;
    letter-spacing: 0.15em; margin-bottom: 12px; }
.news-archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.news-archive-card .article-title { font-size: 0.75rem; }
.news-empty-hint { color: #444; font-size: 0.65rem; text-align: center; padding: 40px 0; }
/* Mode selector bar */
.news-mode-bar { display: flex; gap: 4px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.news-mode-btn { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06);
    color: #555; padding: 5px 14px; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.08em;
    cursor: pointer; font-family: inherit; transition: all 0.2s; border-radius: 1px; }
.news-mode-btn:hover { color: #aaa; border-color: rgba(255,255,255,0.12); }
.news-mode-btn.active { color: var(--cyan); border-color: rgba(0,255,249,0.3);
    background: rgba(0,255,249,0.04); }
.mode-icon { font-size: 0.65rem; }

/* Follow-up buttons in article view */
.article-followup { margin-top: 28px; padding-top: 16px;
    border-top: 1px solid rgba(0,255,249,0.06); display: flex; align-items: center;
    gap: 8px; flex-wrap: wrap; }
.followup-label { font-size: 0.6rem; color: #444; letter-spacing: 0.05em; margin-right: 4px; }
.followup-btn { font-size: 0.6rem; padding: 4px 12px; }

.news-explain { max-width: 540px; margin: 10px auto 0; font-size: 0.62rem; color: #555;
    line-height: 1.7; text-align: center; }
.news-explain strong { color: #666; }
.news-explain-sources { display: block; margin-top: 4px; font-size: 0.55rem; color: #3a3a3a;
    letter-spacing: 0.06em; }

/* Legacy compat */
.news-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.news-actions { display: flex; gap: 8px; }
.btn-outline { background: transparent; border: 1px solid rgba(0,255,249,0.2); color: var(--cyan);
    padding: 4px 12px; font-size: 0.65rem; cursor: pointer; letter-spacing: 0.05em;
    transition: all 0.2s; font-family: inherit; }
.btn-outline:hover { background: rgba(0,255,249,0.08); border-color: rgba(0,255,249,0.4); }
.btn-primary { background: rgba(0,255,65,0.1); border: 1px solid rgba(0,255,65,0.3); color: var(--green);
    padding: 6px 16px; font-size: 0.7rem; cursor: pointer; font-family: inherit; }
.btn-primary:hover { background: rgba(0,255,65,0.2); }

/* News Ticker */
.news-ticker { background: rgba(0,255,249,0.03); border-left: 2px solid var(--cyan);
    padding: 6px 12px; margin-bottom: 12px; overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-block; animation: ticker-scroll 60s linear infinite; }
.ticker-track:hover { animation-play-state: paused; }
.ticker-item { font-size: 0.65rem; font-weight: 600; }
.ticker-sep { color: #333; margin: 0 8px; font-size: 0.6rem; }
.ticker-empty { color: #555; font-size: 0.6rem; font-style: italic; }
@keyframes ticker-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Stats bar */
.news-stats { display: flex; gap: 16px; font-size: 0.55rem; color: #666; letter-spacing: 0.05em;
    margin-bottom: 12px; flex-wrap: wrap; }
.news-stats .pulse-green { color: var(--green); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Article cards */
.article-card { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04);
    padding: 12px; cursor: pointer; transition: all 0.2s; margin-bottom: 8px; }
.article-card:hover { background: rgba(255,255,255,0.04); transform: translateY(-1px); }
.article-kicker { font-size: 0.5rem; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
.article-title { font-size: 0.8rem; font-weight: 700; color: #fff; margin: 4px 0; line-height: 1.3; }
.article-excerpt { font-size: 0.65rem; color: #888; line-height: 1.5; margin: 4px 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-meta { font-size: 0.5rem; color: #555; margin-top: 6px; }
.article-card-top { display: flex; justify-content: space-between; align-items: center; }
.article-mode-badge { font-size: 0.42rem; font-weight: 700; color: #444; letter-spacing: 0.1em;
    border: 1px solid rgba(255,255,255,0.06); padding: 1px 6px; }

/* Featured card */
.article-card.featured .article-card-inner { display: flex; gap: 16px; }
.article-card.featured .article-title { font-size: 1rem; }
.article-card.featured .article-excerpt { -webkit-line-clamp: 3; }
.featured-img { flex: 0 0 45%; max-height: 200px; overflow: hidden; border-radius: 2px; }
.article-img { width: 100%; height: 100%; background-size: cover; background-position: center;
    transition: transform 0.3s; }
.article-card:hover .article-img { transform: scale(1.03); }

/* Medium cards */
.article-row.secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.medium-img { height: 120px; overflow: hidden; border-radius: 2px; margin-bottom: 8px; }
.article-card.medium .article-title { font-size: 0.85rem; }

/* Small grid */
.article-row.small-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }

/* Empty state */
.news-empty { text-align: center; padding: 60px 20px; color: #555; }
.news-empty-icon { font-size: 2rem; margin-bottom: 12px; }
.news-empty h3 { color: #888; font-size: 0.9rem; margin-bottom: 6px; }
.news-empty p { font-size: 0.65rem; }

/* Article view */
.article-view { max-width: 800px; margin: 0 auto; }
.back-btn { background: none; border: none; color: var(--cyan); font-size: 0.7rem;
    cursor: pointer; padding: 4px 0; margin-bottom: 12px; font-family: inherit; }
.back-btn:hover { text-decoration: underline; }
.article-header { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04);
    padding: 16px; margin-bottom: 16px; }
.article-header h1 { font-size: 1.3rem; font-weight: 900; color: #fff; margin: 8px 0; line-height: 1.2; }
.article-hero { width: 100%; max-height: 400px; object-fit: cover; border-radius: 2px; margin-bottom: 16px; }

/* Prose (article body) */
.prose-frank { font-size: 0.85rem; line-height: 1.9; color: #b0b8c0; }
.prose-frank p { margin: 0 0 16px; }
.prose-frank p:last-child { margin-bottom: 0; }
.prose-frank h2 { font-size: 0.95rem; font-weight: 800; color: var(--cyan); margin: 28px 0 10px;
    letter-spacing: 0.04em; }
.prose-frank h3 { font-size: 0.88rem; font-weight: 700; color: #ddd; margin: 20px 0 8px; }
.prose-frank blockquote { border-left: 2px solid #B34DFF; padding-left: 12px; margin: 16px 0;
    color: #999; font-style: italic; }
.prose-frank code { background: rgba(0,255,249,0.08); border: 1px solid rgba(0,255,249,0.15);
    padding: 1px 4px; font-size: 0.8em; color: var(--cyan); }
.prose-frank a { color: var(--cyan); text-decoration: none; border-bottom: 1px solid rgba(0,255,249,0.2);
    transition: border-color 0.2s; }
.prose-frank a:hover { border-color: var(--cyan); }
.prose-frank strong { color: #ccc; }
.prose-frank hr { border: none; border-top: 1px solid rgba(0,255,249,0.08); margin: 24px 0 16px; }

/* Sources block at article bottom */
.prose-frank .sources-block { margin-top: 24px; padding-top: 16px;
    border-top: 1px solid rgba(0,255,249,0.08); }
.prose-frank .sources-block a { font-size: 0.65rem; color: #666;
    border-bottom: 1px solid rgba(255,255,255,0.05); }
.prose-frank .sources-block a:hover { color: var(--cyan); }

/* Topic modal — full-size with two-column layout */
.modal.hidden { display: none; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(6px); z-index: 1000;
    display: flex; align-items: center; justify-content: center; }
.modal-content { background: #0a0a12; border: 1px solid rgba(0,255,249,0.15);
    max-width: 600px; width: 90%; max-height: 85vh; overflow-y: auto; padding: 20px; }
.modal-content.modal-large { max-width: 960px; width: 95%; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.modal-header h2 { font-size: 1rem; font-weight: 900; color: #fff; letter-spacing: 0.12em; }
.modal-close { background: none; border: none; color: #666; font-size: 1.4rem; cursor: pointer;
    padding: 4px 8px; transition: color 0.2s; }
.modal-close:hover { color: #ff5555; }
.modal-hint { font-size: 0.6rem; color: #555; margin-bottom: 12px; }
.modal-section { margin-top: 16px; }
.modal-section h3 { font-size: 0.7rem; color: var(--cyan); letter-spacing: 0.1em; margin-bottom: 8px; }
.modal-footer { margin-top: 16px; display: flex; justify-content: space-between; align-items: center;
    border-top: 1px solid rgba(255,255,255,0.05); padding-top: 12px; }

/* Two-column layout */
.modal-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .modal-columns { grid-template-columns: 1fr; } }
.modal-col-title { font-size: 0.7rem; font-weight: 800; color: var(--cyan); letter-spacing: 0.12em;
    margin-bottom: 10px; border-bottom: 1px solid rgba(0,255,249,0.1); padding-bottom: 6px; }
.hint-inline { font-weight: 400; color: #555; font-size: 0.55rem; }

/* Topic tree — accordion with expand/collapse */
.topic-tree-scroll { max-height: 55vh; overflow-y: auto; padding-right: 4px; }
.topic-tree-scroll::-webkit-scrollbar { width: 3px; }
.topic-tree-scroll::-webkit-scrollbar-thumb { background: rgba(0,255,249,0.2); border-radius: 2px; }

.topic-node { margin-bottom: 1px; }
.topic-row { display: flex; align-items: center; gap: 4px; }
.topic-toggle { cursor: pointer; color: var(--cyan); font-size: 0.55rem; width: 14px; text-align: center;
    transition: transform 0.2s; user-select: none; flex-shrink: 0; }
.topic-toggle:hover { color: #fff; }
.topic-toggle-spacer { width: 14px; flex-shrink: 0; }

.topic-item { display: flex; align-items: center; cursor: pointer; font-size: 0.72rem; color: #aaa;
    padding: 3px 0; flex: 1; }
.topic-item.parent { font-weight: 700; color: #fff; font-size: 0.78rem; }
.topic-item.child { color: #bbb; }
.topic-item.grandchild { font-size: 0.65rem; color: #888; }
.topic-check { margin-right: 6px; accent-color: var(--cyan); flex-shrink: 0; }

.topic-children-wrap { margin-left: 18px; border-left: 1px solid rgba(0,255,249,0.08); padding-left: 8px;
    overflow: hidden; transition: max-height 0.3s ease; }
.topic-children-wrap.collapsed { max-height: 0; opacity: 0; pointer-events: none; }
.topic-children-wrap:not(.collapsed) { max-height: 2000px; opacity: 1; }

/* Topic counter */
.topic-counter { font-size: 0.65rem; color: #666; letter-spacing: 0.05em; }

/* Search boxes (entity + github) */
.search-box { position: relative; margin-bottom: 8px; }
.input-dark { width: 100%; background: #0d0d15; border: 1px solid #2a2a3a; color: #ccc;
    padding: 8px 12px; font-size: 0.75rem; font-family: inherit; box-sizing: border-box; }
.input-dark.input-large { font-size: 0.8rem; padding: 10px 14px; }
.input-dark:focus { border-color: var(--cyan); outline: none; box-shadow: 0 0 8px rgba(0,255,249,0.1); }
.input-dark::placeholder { color: #444; }

/* Search dropdown (live results below input) */
.search-dropdown { position: absolute; top: 100%; left: 0; right: 0; z-index: 10;
    background: #0d0d18; border: 1px solid rgba(0,255,249,0.15); border-top: none;
    max-height: 250px; overflow-y: auto; }
.search-dropdown:empty { display: none; }
.search-no-results { padding: 12px; color: #555; font-size: 0.65rem; text-align: center; font-style: italic; }

.search-result-item { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background 0.15s; }
.search-result-item:hover { background: rgba(0,255,249,0.06); }
.search-result-main { display: flex; align-items: center; gap: 8px; }
.search-result-main strong { color: #fff; font-size: 0.75rem; }
.result-badge { font-size: 0.5rem; letter-spacing: 0.08em; text-transform: uppercase;
    background: rgba(0,255,249,0.1); color: var(--cyan); padding: 1px 6px; border-radius: 2px; }
.result-badge.gh-stars { background: rgba(255,217,0,0.1); color: #FFD900; }
.search-result-meta { font-size: 0.6rem; color: #666; margin-top: 3px; line-height: 1.4; }
.search-result-stats { font-size: 0.5rem; color: #555; margin-top: 2px; }

/* Tracked entity/github chips */
.tracked-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tracked-chip { display: inline-flex; align-items: center; gap: 4px;
    background: rgba(0,255,249,0.06); border: 1px solid rgba(0,255,249,0.15);
    padding: 3px 8px; font-size: 0.65rem; color: #ccc; }
.tracked-chip.github { background: rgba(0,255,65,0.06); border-color: rgba(0,255,65,0.15); }
.chip-type { font-size: 0.45rem; color: var(--cyan); letter-spacing: 0.08em; text-transform: uppercase; }
.tracked-chip.github .chip-type { color: var(--green); }
.chip-remove { background: none; border: none; color: #555; cursor: pointer; font-size: 0.8rem;
    padding: 0 2px; transition: color 0.15s; }
.chip-remove:hover { color: #ff5555; }

/* Save button */
.btn-large { padding: 8px 24px; font-size: 0.8rem; }

/* Explanation text */
.modal-explain { font-size: 0.65rem; color: #777; line-height: 1.6; margin-bottom: 14px;
    border-left: 2px solid rgba(0,255,249,0.15); padding-left: 10px; }
.modal-explain strong { color: var(--cyan); }

/* Prominent figures quick-select */
.prominent-group { margin: 10px 0; }
.prominent-group-title { font-size: 0.55rem; font-weight: 700; color: #555; letter-spacing: 0.1em;
    text-transform: uppercase; margin-bottom: 6px; }
.prominent-pills { display: flex; flex-wrap: wrap; gap: 4px; max-height: 120px; overflow-y: auto;
    padding-right: 4px; }
.prominent-pills::-webkit-scrollbar { width: 3px; }
.prominent-pills::-webkit-scrollbar-thumb { background: rgba(0,255,249,0.2); border-radius: 2px; }
.prominent-pill { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
    color: #aaa; font-size: 0.6rem; padding: 3px 8px; cursor: pointer; font-family: inherit;
    transition: all 0.15s; }
.prominent-pill:hover { background: rgba(0,255,249,0.06); border-color: rgba(0,255,249,0.2); color: #fff; }
.prominent-pill.pill-selected { background: rgba(0,255,249,0.1); border-color: var(--cyan); color: var(--cyan); }
.pill-role { font-size: 0.45rem; color: #555; margin-left: 4px; }
.topic-label-only { cursor: default; color: #fff; font-weight: 700; }
.result-src { font-size: 0.45rem; color: #555; margin-left: 4px; font-style: italic; }

/* Responsive */
@media (max-width: 768px) {
    .article-row.secondary { grid-template-columns: 1fr; }
    .article-row.small-grid { grid-template-columns: 1fr 1fr; }
    .article-card.featured .article-card-inner { flex-direction: column; }
    .featured-img { flex: none; max-height: 150px; }
    .news-header { flex-direction: column; gap: 8px; align-items: flex-start; }
}

/* ══════════════════════════════════════════════════════════════════
   LANDING PAGE — Modern onepager, myclaw.ai inspired
   ══════════════════════════════════════════════════════════════════ */

.land { max-width: 100%; overflow-x: hidden; position: relative; }

/* ── GoL Background Canvas ────────────────────────────────────── */
.land-gol-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.12;
    image-rendering: pixelated;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Aurora nebula — colored fog over GoL, doesn't darken it */
.land-aurora {
    position: fixed; inset: 0; z-index: 0;
    pointer-events: none; overflow: hidden;
    mix-blend-mode: screen;
}
.land-aurora-blob {
    position: absolute; border-radius: 50%;
    filter: blur(120px); opacity: 0.08;
    animation: auroraFloat 20s ease-in-out infinite;
}
.land-aurora-1 {
    width: 600px; height: 600px; background: #00FF41;
    top: -200px; left: -100px; animation-duration: 25s;
}
.land-aurora-2 {
    width: 500px; height: 500px; background: #00fff9;
    bottom: -200px; right: -100px;
    animation-duration: 30s; animation-delay: -10s;
}
.land-aurora-3 {
    width: 400px; height: 400px; background: #ff00cc;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    animation-duration: 35s; animation-delay: -20s; opacity: 0.04;
}
@keyframes auroraFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(60px, -40px) scale(1.1); }
    50% { transform: translate(-30px, 50px) scale(0.9); }
    75% { transform: translate(-50px, -20px) scale(1.05); }
}

/* All content above the canvas + aurora */
.land > *:not(.land-gol-canvas):not(.land-aurora) { position: relative; z-index: 1; }

/* ── Animated headline glow ──────────────────────────────────── */
.land-glow-text {
    background: linear-gradient(90deg, var(--green) 0%, var(--cyan) 40%, var(--green) 80%, #33ff99 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glowShift 4s ease-in-out infinite alternate;
}
@keyframes glowShift {
    0%   { background-position: 0% center; filter: drop-shadow(0 0 8px rgba(0,255,65,0.3)); }
    100% { background-position: 100% center; filter: drop-shadow(0 0 16px rgba(0,255,249,0.4)); }
}

/* ── Scroll fade-in animations ───────────────────────────────── */
.land-fade-in {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.land-fade-in.land-visible {
    opacity: 1; transform: translateY(0);
}
/* Stagger children */
.land-fade-in:nth-child(2) { transition-delay: 0.1s; }
.land-fade-in:nth-child(3) { transition-delay: 0.2s; }
.land-fade-in:nth-child(4) { transition-delay: 0.3s; }
.land-fade-in:nth-child(5) { transition-delay: 0.35s; }
.land-fade-in:nth-child(6) { transition-delay: 0.4s; }

/* ── Hero ─────────────────────────────────────────────────────── */
.land-hero {
    display: flex; align-items: center; justify-content: center; gap: 40px;
    min-height: calc(100vh - var(--nav-height));
    max-width: 1100px; margin: 0 auto;
    padding: 0 32px;
    margin-top: -20px;
}
.land-hero-content { flex: 1; max-width: 520px; text-align: center; }
.land-h1 {
    font-size: 52px; line-height: 1.08; font-weight: 800;
    color: #f0f4ff; margin-bottom: 20px; letter-spacing: -1.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
}
.land-accent { color: var(--green); }
.land-hero-sub {
    font-size: 15px; line-height: 1.8; color: rgba(255,255,255,0.45);
    margin-bottom: 28px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 440px;
    letter-spacing: 0.2px;
    text-align: justify;
    hyphens: auto;
    margin-left: auto; margin-right: auto;
}
.land-hero-cta { display: flex; gap: 16px; margin-bottom: 12px; }
.land-hero-note { font-size: 12px; color: #556677; }
.land-hero-img {
    flex: 0 0 320px;
    display: flex; align-items: center; justify-content: center;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.land-btn {
    display: inline-block; padding: 14px 32px; border-radius: 12px;
    font-size: 15px; font-weight: 600; text-decoration: none;
    transition: all 0.25s ease; cursor: pointer; border: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.land-btn-primary {
    background: var(--green); color: #050508;
    box-shadow: 0 4px 20px rgba(0, 255, 65, 0.25);
}
.land-btn-primary:hover { background: #33ff66; transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0, 255, 65, 0.35); }
.land-btn-ghost { background: transparent; color: #8899aa; border: 1px solid #2a3040; }
.land-btn-ghost:hover { border-color: var(--green); color: var(--green); }
.land-btn-outline { background: transparent; color: var(--green); border: 1px solid var(--green-dim); padding: 12px 28px; }
.land-btn-outline:hover { background: rgba(0, 255, 65, 0.08); }
.land-btn-lg { padding: 18px 48px; font-size: 17px; border-radius: 14px; }
.af-nav-cta { background: var(--green-dark) !important; color: var(--green) !important; border-radius: 8px !important; }

/* ── Strip ────────────────────────────────────────────────────── */
.land-strip {
    display: flex; align-items: center; justify-content: center; gap: 32px;
    padding: 20px 32px; border-top: 1px solid #141820; border-bottom: 1px solid #141820;
    font-size: 12px; color: #445566; text-transform: uppercase; letter-spacing: 1px;
}
.land-strip-logo { color: #667788; font-weight: 600; }

/* ── Sections ─────────────────────────────────────────────────── */
.land-section { max-width: 1100px; margin: 0 auto; padding: 60px 32px; }
.land-section-dark { background: #080c14; max-width: 100%; }
.land-section-dark > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.land-h2 {
    font-size: 40px; font-weight: 800; color: #f0f4ff;
    text-align: center; margin-bottom: 16px; letter-spacing: -1px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
    line-height: 1.15;
}
.land-section-sub {
    text-align: center; font-size: 16px; color: #667788; max-width: 600px;
    margin: 0 auto 48px; line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Features Grid ────────────────────────────────────────────── */
.land-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.land-feature {
    background: #0d1117; border: 1px solid #1a2030; border-radius: 16px;
    padding: 32px 28px; transition: all 0.3s ease;
}
.land-feature:hover { border-color: rgba(0, 255, 65, 0.2); transform: translateY(-4px); }
.land-feature-icon { font-size: 32px; margin-bottom: 16px; }
.land-feature h3 { font-size: 16px; color: #e0e8f0; margin-bottom: 10px; font-weight: 700; }
.land-feature p {
    font-size: 13px; color: #667788; line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Use Cases ────────────────────────────────────────────────── */
.land-cases { display: grid; gap: 24px; max-width: 800px; margin: 0 auto; padding: 0 32px; }
.land-case {
    background: #0a0f18; border: 1px solid #1a2030; border-radius: 16px;
    padding: 36px 32px; position: relative; transition: all 0.3s;
}
.land-case:hover { border-color: rgba(0, 255, 65, 0.15); }
.land-case-num {
    position: absolute; top: 28px; right: 28px; font-size: 48px;
    font-weight: 900; color: rgba(0, 255, 65, 0.06); line-height: 1;
}
.land-case h3 { font-size: 20px; color: var(--green); margin-bottom: 12px; font-weight: 700; }
.land-case p {
    font-size: 14px; color: #8899aa; line-height: 1.7;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.land-case strong { color: #c8d6e5; }
.land-case-tag {
    display: inline-block; margin-top: 16px; padding: 4px 12px;
    background: rgba(0, 255, 65, 0.06); border: 1px solid rgba(0, 255, 65, 0.12);
    border-radius: 20px; font-size: 11px; color: var(--green-dim);
    text-transform: uppercase; letter-spacing: 1px;
}

/* ── Steps ────────────────────────────────────────────────────── */
.land-steps { display: flex; align-items: flex-start; justify-content: center; gap: 16px; flex-wrap: wrap; }
.land-step {
    background: #0d1117; border: 1px solid #1a2030; border-radius: 16px;
    padding: 28px 24px; flex: 0 0 200px; text-align: center;
}
.land-step-num {
    width: 40px; height: 40px; background: var(--green); color: #050508;
    border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 18px; margin-bottom: 16px;
}
.land-step h3 { font-size: 14px; color: #e0e8f0; margin-bottom: 8px; }
.land-step p {
    font-size: 12px; color: #667788; line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.land-step a { color: var(--cyan); }
.land-step-arrow { font-size: 24px; color: #2a3040; padding-top: 40px; }

/* ── Pricing ──────────────────────────────────────────────────── */
.land-pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 900px; margin: 0 auto; padding: 0 32px; }
.land-price-card {
    background: #0a0f18; border: 1px solid #1a2030; border-radius: 16px;
    padding: 36px 28px; text-align: center; position: relative;
}
.land-price-pop { border-color: var(--green-dim); box-shadow: 0 0 40px rgba(0, 255, 65, 0.06); }
.land-price-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--green); color: #050508; font-size: 11px; font-weight: 700;
    padding: 4px 16px; border-radius: 20px; text-transform: uppercase;
}
.land-price-card h3 { font-size: 20px; color: #e0e8f0; margin-bottom: 8px; }
.land-price {
    font-size: 48px; font-weight: 800; color: var(--green); margin-bottom: 24px;
}
.land-price span { font-size: 16px; color: #556677; font-weight: 400; }
.land-price-card ul { list-style: none; margin-bottom: 28px; text-align: left; }
.land-price-card li {
    padding: 8px 0; font-size: 13px; color: #8899aa;
    border-bottom: 1px solid #141820;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.land-price-card li::before { content: "\2713  "; color: var(--green); margin-right: 8px; }
.land-price-card .land-btn { width: 100%; text-align: center; }

/* ── Final CTA ────────────────────────────────────────────────── */
.land-final-cta { text-align: center; padding: 80px 32px; }
.land-final-terminal { font-size: 48px; font-family: monospace; color: var(--green); margin-bottom: 24px; animation: termBlink 1s step-end infinite; }
@keyframes termBlink { 50% { opacity: 0.3; } }

/* ── Footer ───────────────────────────────────────────────────── */
.land-footer {
    border-top: 1px solid #141820; padding: 48px 32px 32px;
    max-width: 1100px; margin: 0 auto;
}
.land-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.land-footer-grid strong { color: #8899aa; font-size: 13px; }
.land-footer-grid a { display: block; color: #556677; font-size: 12px; margin-top: 6px; }
.land-footer-grid a:hover { color: var(--green); }
.land-footer-copy { text-align: center; font-size: 11px; color: #334455; border-top: 1px solid #141820; padding-top: 24px; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
    .land-hero { flex-direction: column; text-align: center; gap: 20px; padding-top: 20px; height: auto; min-height: auto; }
    .land-hero-content { max-width: 100%; }
    .land-hero-cta { justify-content: center; }
    .land-hero-img { flex: none; order: -1; width: 100%; max-width: 320px; }
    .land-h1 { font-size: 32px; }
    .land-h2 { font-size: 28px; }
    .land-features { grid-template-columns: 1fr; }
    .land-pricing { grid-template-columns: 1fr; max-width: 360px; }
    .land-steps { flex-direction: column; align-items: center; }
    .land-step-arrow { transform: rotate(90deg); padding: 0; }
    .land-strip { flex-wrap: wrap; gap: 16px; }
    .land-footer-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════
   CHAT DEMO — Animated conversation showcase
   ══════════════════════════════════════════════════════════════════ */

.land-demo-section { padding: 40px 32px 80px; }

.land-demo-window {
    max-width: 780px; margin: 0 auto;
    background: #080b12; border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px; overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.03);
}

/* Title bar */
.land-demo-titlebar {
    display: flex; align-items: center; padding: 12px 18px;
    background: #0c1018; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.land-demo-dots { display: flex; gap: 6px; margin-right: 14px; }
.ld-r, .ld-y, .ld-g { width: 10px; height: 10px; border-radius: 50%; display: block; }
.ld-r { background: #ff5f57; }
.ld-y { background: #ffbd2e; }
.ld-g { background: #28c840; }
.land-demo-title { font-size: 12px; color: rgba(255,255,255,0.3); flex: 1; font-family: monospace; }
.land-demo-status { font-size: 11px; color: #28c840; }

/* Chat area */
.land-demo-chat {
    min-height: 380px; max-height: 420px; overflow-y: auto;
    padding: 20px; display: flex; flex-direction: column; gap: 14px;
    scrollbar-width: none;
}
.land-demo-chat::-webkit-scrollbar { display: none; }

/* Messages */
.ld-msg { display: flex; gap: 10px; max-width: 90%; }
.ld-msg.ld-user { align-self: flex-end; flex-direction: row-reverse; }
.ld-msg.ld-agent { align-self: flex-start; }

.ld-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--green-dark); color: var(--green);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; flex-shrink: 0;
}

.ld-bubble {
    padding: 12px 16px; border-radius: 14px; font-size: 13px; line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.ld-user-bubble {
    background: var(--green); color: #000; font-weight: 500;
    border-bottom-right-radius: 4px;
}
.ld-agent-bubble {
    background: #111620; color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.05);
    border-bottom-left-radius: 4px;
}

/* Tool calls inside agent messages */
.ld-tools { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.ld-tool {
    font-size: 11px; color: rgba(255,255,255,0.35); padding: 5px 10px;
    background: rgba(0,255,65,0.03); border: 1px solid rgba(0,255,65,0.08);
    border-radius: 6px; font-family: monospace;
}
.ld-tool-name { color: var(--green); font-weight: 600; }

/* Typing indicator */
.ld-typing .ld-bubble { padding: 14px 20px; }
.ld-dots span {
    display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,255,255,0.3); margin: 0 2px;
    animation: ldBounce 1.4s infinite;
}
.ld-dots span:nth-child(2) { animation-delay: 0.2s; }
.ld-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ldBounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}

/* Input bar */
.land-demo-input {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px; border-top: 1px solid rgba(255,255,255,0.04);
    background: #0a0e16;
}
.land-demo-user-av {
    width: 28px; height: 28px; border-radius: 50%;
    background: #1a3a5c; color: #5b9bd5;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
}
.land-demo-inputbox {
    flex: 1; padding: 10px 16px; border-radius: 10px;
    background: #111620; border: 1px solid rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.2); font-size: 13px;
}
.land-demo-send {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}

@media (max-width: 768px) {
    .land-demo-chat { min-height: 300px; }
    .ld-bubble { font-size: 12px; }
    .ld-tool { font-size: 10px; }
}

/* ── Demo sidebar ─────────────────────────────────────────────── */
.land-demo-body { display: flex; min-height: 400px; }
.land-demo-sidebar {
    width: 140px; flex-shrink: 0;
    background: #070a10; border-right: 1px solid rgba(255,255,255,0.04);
    padding: 16px 10px; display: flex; flex-direction: column; gap: 2px;
}
.ld-nav-item {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px; border-radius: 8px;
    font-size: 12px; color: rgba(255,255,255,0.35); cursor: default;
    transition: all 0.2s;
}
.ld-nav-active { background: rgba(0,255,65,0.08); color: var(--green); font-weight: 600; }
.ld-nav-dot { width: 8px; height: 8px; border-radius: 3px; flex-shrink: 0; }
.land-demo-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.land-demo-main .land-demo-chat { flex: 1; }

@media (max-width: 768px) {
    .land-demo-sidebar { display: none; }
}

/* ══════════════════════════════════════════════════════════════════
   ONBOARDING — Gamified terminal intro
   ══════════════════════════════════════════════════════════════════ */

.ob-page {
    display: flex; justify-content: center; align-items: center;
    height: 100vh;
    padding: 0 20px;
    overflow: hidden;
    margin-top: calc(-1 * var(--nav-height));
}
/* Hide nav on onboarding */
body:has(.ob-page) .af-nav { display: none; }

/* Phase 1: API Key Card */
.ob-apikey-card {
    max-width: 480px; width: 100%;
    background: var(--bg-surface); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px; padding: 24px 28px; text-align: center;
}
.ob-apikey-title { font-size: 20px; color: #f0f4ff; margin-bottom: 6px; font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }
.ob-apikey-sub { font-size: 13px; color: rgba(255,255,255,0.4); margin-bottom: 18px; font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }
.ob-steps { text-align: left; display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.ob-step-card { display: flex; gap: 12px; padding: 10px 12px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; }
.ob-step-num { width: 24px; height: 24px; flex-shrink: 0; background: var(--green); color: #000; font-weight: 800; font-size: 12px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.ob-step-card strong { color: #ddd; font-size: 12px; display: block; margin-bottom: 2px; }
.ob-step-card p { font-size: 11px; color: rgba(255,255,255,0.4); line-height: 1.4; margin: 0; font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }
.ob-step-card code { background: rgba(0,255,65,0.08); color: var(--green); padding: 1px 5px; border-radius: 3px; font-size: 11px; }
.ob-warn { color: #FFD900; font-weight: 600; }
.ob-link { display: inline-block; margin-top: 6px; color: var(--green); font-size: 12px; font-weight: 600; }
.ob-link:hover { text-decoration: underline; }
.ob-key-input-wrap { display: flex; gap: 10px; margin-bottom: 10px; }
.ob-key-input { flex: 1; background: #0a0a0f; color: #fff; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 12px 16px; font-size: 14px; font-family: monospace; outline: none; transition: border 0.2s; }
.ob-key-input:focus { border-color: var(--green); }
.ob-key-input.ob-key-error { border-color: #ff3333; animation: obShake 0.3s ease; }
@keyframes obShake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.ob-key-btn { background: var(--green); color: #000; border: none; border-radius: 8px; padding: 12px 24px; font-weight: 700; font-size: 14px; cursor: pointer; transition: all 0.2s; }
.ob-key-btn:hover { opacity: 0.9; }
.ob-key-btn:disabled { opacity: 0.5; cursor: wait; }
.ob-key-hint { font-size: 11px; color: rgba(255,255,255,0.25); }

/* Phase 2: Terminal Popup */
.ob-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center; }
.ob-terminal {
    width: 480px; max-width: 92vw;
    background: #000; border: 2px solid #555;
    box-shadow: 0 0 60px rgba(0,0,0,0.9), 0 0 2px rgba(255,255,255,0.08);
}
.ob-bounce-in { animation: obBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes obBounce { 0% { transform: scale(0.3); opacity: 0; } 50% { transform: scale(1.05); } 70% { transform: scale(0.95); } 100% { transform: scale(1); opacity: 1; } }
.ob-titlebar {
    background: #111; border-bottom: 1px solid #333;
    padding: 8px 0; text-align: center;
}
.ob-title { font-size: 11px; color: #555; letter-spacing: 3px; font-family: monospace; }
.ob-screen {
    position: relative; min-height: 400px; max-height: 70vh;
    overflow-y: auto; scrollbar-width: none;
}
.ob-screen::-webkit-scrollbar { display: none; }
.ob-screen canvas {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 1;
}
.ob-text-layer {
    position: relative; z-index: 2;
    padding: 20px; min-height: 380px;
    display: flex; flex-direction: column; justify-content: flex-end;
}
#ob-lines { margin-bottom: 12px; }
.ob-input-line {
    display: flex; align-items: center;
    font-family: monospace; font-size: 13px; color: #fff;
}
.ob-prompt { color: var(--green); margin-right: 4px; }
#ob-input-display { color: #fff; }
.ob-cursor { color: var(--green); font-weight: bold; animation: none; margin-left: 1px; }
.ob-hidden-input {
    position: absolute; left: -9999px; opacity: 0; width: 1px; height: 1px;
}

/* Scanlines on terminal */
.ob-screen::after {
    content: ''; position: absolute; inset: 0; z-index: 3;
    background: repeating-linear-gradient(transparent, transparent 2px, rgba(255,255,255,0.008) 2px, rgba(255,255,255,0.008) 4px);
    pointer-events: none;
}

/* Animated loading dots */
.ob-loading-dots span {
    display: inline-block;
    animation: obDotPulse 1.4s infinite;
    opacity: 0.3;
}
.ob-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.ob-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes obDotPulse {
    0%, 80%, 100% { opacity: 0.2; }
    40% { opacity: 1; }
}

/* Pulsing CTA button */
.land-btn-pulse {
    animation: btnPulse 2s ease-in-out infinite;
}
@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(0,255,65,0.25); }
    50% { box-shadow: 0 0 30px rgba(0,255,65,0.5), 0 0 60px rgba(0,255,65,0.15); }
}
