/* ============================================================
   Blog stylesheet — shared by blog/index.html and all articles
   Matches the main portfolio design system (Fluent / Azure blue)
   ============================================================ */

:root {
    --primary: #0078d4;
    --primary-dark: #005a9e;
    --primary-light: #deecf9;
    --accent: #00b4d8;
    --dark: #0f172a;
    --text: #334155;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --white: #ffffff;
    --off-white: #f8fafc;
    --border: #e2e8f0;
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--off-white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: var(--transition);
}
.navbar.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.3); }
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.nav-logo { font-weight: 800; font-size: 1.25rem; color: #fff; text-decoration: none; letter-spacing: -0.5px; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 8px; list-style: none; }
.nav-links a {
    color: var(--text-lighter);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255,255,255,0.08); }
.nav-links a.active { color: var(--accent); }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }
.theme-toggle {
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--text-lighter);
    width: 36px; height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
    margin-left: 8px;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }

/* ===== Page / Listing Hero ===== */
.page-hero {
    background: var(--gradient-hero);
    padding: 120px 24px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -30%; right: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(0,120,212,0.12) 0%, transparent 70%);
    border-radius: 50%;
}
.page-hero-content { position: relative; z-index: 1; }
.page-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,180,216,0.12);
    border: 1px solid rgba(0,180,216,0.25);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.page-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
    line-height: 1.2;
    margin-bottom: 16px;
}
.page-hero h1 span { color: var(--accent); }
.page-hero p {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.65);
    max-width: 560px;
    margin: 0 auto;
}

/* ===== Blog Layout ===== */
.blog-container { max-width: 1200px; margin: 0 auto; padding: 60px 24px 80px; }

/* ===== Search Bar ===== */
.blog-search-wrap {
    position: relative;
    margin-bottom: 20px;
}
.blog-search-wrap i.fa-magnifying-glass {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-lighter);
    font-size: 0.95rem;
    pointer-events: none;
}
#blogSearch {
    width: 100%;
    padding: 12px 44px 12px 42px;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: var(--white);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
#blogSearch::placeholder { color: var(--text-lighter); }
#blogSearch:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,120,212,0.12); }
#searchClear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-lighter);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    display: none;
    transition: var(--transition);
}
#searchClear:hover { color: var(--text); }
.search-meta {
    font-size: 0.82rem;
    color: var(--text-lighter);
    margin-bottom: 14px;
    min-height: 1.2em;
}
.search-meta strong { color: var(--primary); }
.no-results {
    display: none;
    text-align: center;
    padding: 60px 24px;
    color: var(--text-lighter);
    grid-column: 1 / -1;
}
.no-results i { font-size: 2.5rem; margin-bottom: 16px; display: block; }
.no-results p { font-size: 1rem; margin-bottom: 8px; color: var(--text-light); }
.no-results small { font-size: 0.85rem; }

/* ===== Filter Tags ===== */
.blog-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.filter-btn {
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text-light);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.filter-btn:hover, .filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ===== Blog Grid & Cards ===== */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.post-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.post-card-accent { height: 4px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.post-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.post-meta { display: flex; align-items: center; gap: 14px; font-size: 0.78rem; color: var(--text-lighter); margin-bottom: 12px; }
.post-meta i { font-size: 0.72rem; }
.post-card h2 { font-size: 1.05rem; font-weight: 700; color: var(--dark); line-height: 1.4; margin-bottom: 10px; }
.post-card p { font-size: 0.88rem; color: var(--text-light); line-height: 1.65; flex: 1; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.post-tag { background: var(--primary-light); color: var(--primary-dark); padding: 3px 10px; border-radius: 4px; font-size: 0.72rem; font-weight: 600; }
.post-card-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
}
.post-card-footer i { transition: var(--transition); }
.post-card:hover .post-card-footer i { transform: translateX(4px); }

/* ===== Footer ===== */
.blog-footer { text-align: center; padding: 32px 24px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--text-lighter); }
.blog-footer a { color: var(--primary); text-decoration: none; font-weight: 600; }
.blog-footer a:hover { color: var(--accent); }

/* ===== Reveal Animation ===== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   ARTICLE PAGE STYLES
   ============================================================ */
.article-hero {
    background: var(--gradient-hero);
    padding: 120px 24px 60px;
    position: relative;
    overflow: hidden;
}
.article-hero::before {
    content: '';
    position: absolute;
    top: -30%; right: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(0,120,212,0.12) 0%, transparent 70%);
    border-radius: 50%;
}
.article-hero-inner { max-width: 820px; margin: 0 auto; position: relative; z-index: 1; }
.article-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
    transition: var(--transition);
}
.article-back:hover { color: var(--accent); }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.article-tag {
    background: rgba(0,180,216,0.15);
    border: 1px solid rgba(0,180,216,0.3);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.article-hero h1 { font-size: 2.6rem; font-weight: 800; color: #fff; letter-spacing: -1px; line-height: 1.25; margin-bottom: 20px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; color: rgba(255,255,255,0.5); font-size: 0.85rem; }
.article-meta span { display: flex; align-items: center; gap: 6px; }
.article-meta i { font-size: 0.78rem; }

/* ===== Article Body ===== */
.article-body { max-width: 820px; margin: 0 auto; padding: 56px 24px 80px; }

/* ===== Lead paragraph ===== */
.prose .lead { font-size: 1.12rem; color: var(--text-light); line-height: 1.8; margin-bottom: 1.75rem; }

/* ===== Prose ===== */
.prose h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark);
    margin: 2.5rem 0 1rem;
    letter-spacing: -0.5px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}
.prose h3 { font-size: 1.2rem; font-weight: 700; color: var(--dark); margin: 2rem 0 0.75rem; }
.prose p { margin-bottom: 1.25rem; font-size: 1rem; line-height: 1.8; color: var(--text); }
.prose ul, .prose ol { margin: 0 0 1.25rem 1.5rem; }
.prose li { margin-bottom: 0.5rem; font-size: 1rem; line-height: 1.7; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--accent); }
.prose strong { font-weight: 700; color: var(--dark); }
.prose em { font-style: italic; }
.prose blockquote {
    border-left: 4px solid var(--primary);
    background: var(--primary-light);
    padding: 16px 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--primary-dark);
}
.prose pre {
    background: #0d1b2a;
    color: #e2e8f0;
    padding: 20px 24px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.84rem;
    line-height: 1.65;
    border: 1px solid #1e3a5f;
}
.prose code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.875em;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 2px 6px;
    border-radius: 4px;
}
.prose pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.prose img { width: 100%; border-radius: var(--radius-sm); margin: 1.5rem 0; border: 1px solid var(--border); }
.article-figure { margin: 1.75rem 0; }
.article-figure img { margin: 0; box-shadow: var(--shadow-md); }
.article-figure figcaption {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-lighter);
    font-style: italic;
    margin-top: 0.75rem;
}
.article-figure figcaption em { color: var(--text-light); font-style: normal; }
.prose hr { border: none; border-top: 2px solid var(--border); margin: 2.5rem 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.prose th { background: var(--primary-light); color: var(--primary-dark); font-weight: 700; }
.prose-table-scroll { overflow-x: auto; margin: 1.5rem 0; }
.prose-table-scroll table { margin: 0; }

/* ===== Code block caption ===== */
.code-caption { font-size: 0.8rem; color: var(--text-lighter); margin: -0.75rem 0 1.5rem; font-style: italic; }

/* ===== Callouts ===== */
.callout { display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--radius-sm); margin: 1.5rem 0; font-size: 0.92rem; line-height: 1.65; }
.callout-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.callout-tip  { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.callout-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.callout i { margin-top: 2px; flex-shrink: 0; }
.callout strong { color: inherit; }

/* ===== Article footer / share ===== */
.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.article-footer-back { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); text-decoration: none; font-size: 0.88rem; font-weight: 600; transition: var(--transition); }
.article-footer-back:hover { color: var(--accent); }
.share-links { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; color: var(--text-lighter); }
.share-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}
.share-links a:hover { border-color: var(--primary); color: var(--primary); }

/* ===== Author box ===== */
.author-box {
    display: flex;
    gap: 16px;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-top: 2.5rem;
}
.author-avatar {
    width: 52px; height: 52px;
    min-width: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
}
.author-box h4 { font-size: 0.95rem; color: var(--dark); margin-bottom: 2px; }
.author-box p { font-size: 0.82rem; color: var(--text-light); margin: 0; }

/* ============================================================
   DARK MODE
   ============================================================ */
body.dark-mode {
    --text: #cbd5e1;
    --text-light: #94a3b8;
    --text-lighter: #94a3b8;
    --off-white: #0f172a;
    --white: #1e293b;
    --border: #334155;
    --primary-light: rgba(0,120,212,0.15);
}
body.dark-mode .post-card h2 { color: #f1f5f9; }
body.dark-mode .post-card { background: #1e293b; border-color: #334155; }
body.dark-mode .post-tag { background: rgba(0,120,212,0.2); color: #60a5fa; }
body.dark-mode .filter-btn { background: #1e293b; border-color: #334155; color: #94a3b8; }
body.dark-mode #blogSearch { background: #1e293b; border-color: #334155; color: #cbd5e1; }
body.dark-mode #blogSearch:focus { border-color: var(--primary); }
body.dark-mode #blogSearch::placeholder { color: #475569; }
body.dark-mode #searchClear { color: #475569; }
body.dark-mode #searchClear:hover { color: #94a3b8; }
body.dark-mode .no-results { color: #475569; }
body.dark-mode .filter-btn:hover, body.dark-mode .filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
body.dark-mode .post-card-footer { border-color: #334155; }
body.dark-mode .blog-footer { border-color: #334155; }
body.dark-mode .theme-toggle { border-color: #334155; color: #94a3b8; }
body.dark-mode .theme-toggle:hover { color: var(--accent); border-color: var(--accent); }

body.dark-mode .prose h2, body.dark-mode .prose h3, body.dark-mode .prose strong { color: #f1f5f9; }
body.dark-mode .prose p, body.dark-mode .prose li { color: #cbd5e1; }
body.dark-mode .prose .lead { color: #94a3b8; }
body.dark-mode .prose blockquote { background: rgba(0,120,212,0.12); color: #93c5fd; border-color: var(--primary); }
body.dark-mode .prose code { background: rgba(0,120,212,0.2); color: #93c5fd; }
body.dark-mode .prose h2 { border-color: #1e3a5f; }
body.dark-mode .prose img, body.dark-mode .prose th, body.dark-mode .prose td { border-color: #334155; }
body.dark-mode .prose th { background: rgba(0,120,212,0.2); color: #93c5fd; }
body.dark-mode .prose hr { border-color: #334155; }
body.dark-mode .callout-info { background: rgba(30,64,175,0.15); border-color: rgba(191,219,254,0.2); color: #93c5fd; }
body.dark-mode .callout-tip  { background: rgba(22,101,52,0.15);  border-color: rgba(187,247,208,0.2); color: #86efac; }
body.dark-mode .callout-warn { background: rgba(146,64,14,0.15);  border-color: rgba(253,230,138,0.2); color: #fcd34d; }
body.dark-mode .article-footer { border-color: #334155; }
body.dark-mode .share-links a { border-color: #334155; color: #94a3b8; }
body.dark-mode .share-links a:hover { border-color: var(--primary); color: #60a5fa; }
body.dark-mode .author-box { background: #1e293b; border-color: #334155; }
body.dark-mode .author-box h4 { color: #f1f5f9; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: rgba(15,23,42,0.98); padding: 16px; gap: 4px; border-bottom: 1px solid rgba(255,255,255,0.06); }
    .nav-links.active { display: flex; }
    .nav-toggle { display: block; }
    .page-hero h1 { font-size: 2rem; }
    .article-hero h1 { font-size: 1.8rem; }
    .prose h2 { font-size: 1.3rem; }
    .blog-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   UI MOCKUPS — CSS-only "screenshots" for low-code articles
   (Power Apps, Power Automate, Dataverse, Copilot Studio)
   ============================================================ */

/* ----- Generic app-window frame ----- */
.ui-mock {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 1.75rem 0 0.5rem;
    background: var(--white);
    box-shadow: var(--shadow-md);
    font-family: 'Inter', sans-serif;
}
.ui-mock-chrome {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border);
}
.ui-mock-dots { display: flex; gap: 6px; }
.ui-mock-dots span { width: 11px; height: 11px; border-radius: 50%; background: #cbd5e1; }
.ui-mock-dots span:nth-child(1) { background: #ff5f57; }
.ui-mock-dots span:nth-child(2) { background: #febc2e; }
.ui-mock-dots span:nth-child(3) { background: #28c840; }
.ui-mock-chrome-title {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}
.ui-mock-chrome-title i { color: var(--primary); }
.ui-mock-body { padding: 20px; background: var(--off-white); }
.ui-caption {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-lighter);
    font-style: italic;
    margin: 0 0 1.75rem;
}
.ui-caption strong { color: var(--text-light); font-style: normal; }

/* ----- Power Automate: vertical flow ----- */
.flow-mock { display: flex; flex-direction: column; align-items: center; }
.flow-node {
    width: 100%;
    max-width: 440px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--white);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    border-top: 3px solid var(--primary);
}
.flow-node-trigger { border-top-color: #107c10; }
.flow-node-action { border-top-color: #0078d4; }
.flow-node-condition { border-top-color: #8661c5; }
.flow-node-terminal { border-top-color: #d13438; }
.flow-node-icon {
    width: 34px; height: 34px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.95rem;
    flex-shrink: 0;
    background: var(--primary);
}
.flow-node-trigger .flow-node-icon { background: #107c10; }
.flow-node-action .flow-node-icon { background: #0078d4; }
.flow-node-condition .flow-node-icon { background: #8661c5; }
.flow-node-terminal .flow-node-icon { background: #d13438; }
.flow-node-text { display: flex; flex-direction: column; line-height: 1.35; }
.flow-node-title { font-weight: 600; color: var(--dark); font-size: 0.82rem; }
.flow-node-sub { color: var(--text-light); font-size: 0.72rem; }
.flow-connector {
    width: 2px;
    height: 26px;
    background: var(--border);
    position: relative;
}
.flow-connector::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--border);
}
.flow-branch {
    display: flex;
    gap: 18px;
    width: 100%;
    max-width: 460px;
    justify-content: center;
}
.flow-branch-col { flex: 1; display: flex; flex-direction: column; align-items: center; }
.flow-branch-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-lighter);
    margin-bottom: 6px;
}

/* ----- Power Apps: device / screen ----- */
.device-mock {
    max-width: 300px;
    margin: 0 auto;
    border: 8px solid #1e293b;
    border-radius: 26px;
    overflow: hidden;
    background: #1e293b;
    box-shadow: var(--shadow-lg);
}
.device-screen { background: var(--white); }
.app-bar {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 14px 16px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.app-bar .fa-plus { font-size: 0.85rem; opacity: 0.9; }
.app-gallery { padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.gallery-row {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
}
.gallery-row.selected { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.gallery-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.72rem; font-weight: 700;
    flex-shrink: 0;
}
.gallery-text { display: flex; flex-direction: column; line-height: 1.3; flex: 1; min-width: 0; }
.gallery-title { font-size: 0.78rem; font-weight: 600; color: var(--dark); }
.gallery-sub { font-size: 0.68rem; color: var(--text-light); }
.gallery-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50px;
    background: #fef3c7;
    color: #92400e;
}
.gallery-badge.approved { background: #dcfce7; color: #166534; }

/* ----- Dataverse: table schema ----- */
.schema-mock {
    max-width: 460px;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--white);
}
.schema-head {
    background: var(--primary);
    color: #fff;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.schema-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
}
.schema-row:last-child { border-bottom: none; }
.schema-col-name { color: var(--dark); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.schema-col-name .fa-key { color: #d4a017; font-size: 0.72rem; }
.col-type {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--primary-light);
    color: var(--primary-dark);
}
.col-type.lookup { background: #ede9fe; color: #6d28d9; }
.col-type.choice { background: #fef3c7; color: #92400e; }
.rel-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}
.rel-entity {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    padding: 10px 16px;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--dark);
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.rel-entity small { display: block; font-weight: 500; color: var(--text-light); font-size: 0.68rem; margin-top: 2px; }
.rel-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-lighter);
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0 4px;
}
.rel-link span:first-child { letter-spacing: 0.5px; }
.rel-link .rel-line { width: 46px; height: 2px; background: var(--primary); margin: 4px 0; position: relative; }

/* ----- Copilot Studio: topic + chat ----- */
.topic-card {
    max-width: 460px;
    margin: 0 auto 14px;
    border: 1px solid var(--border);
    border-left: 4px solid #8661c5;
    border-radius: 8px;
    background: var(--white);
    padding: 14px 16px;
}
.topic-card h5 { font-size: 0.8rem; color: var(--text-light); margin-bottom: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.trigger-phrases { display: flex; flex-wrap: wrap; gap: 6px; }
.trigger-phrase {
    font-size: 0.74rem;
    padding: 4px 10px;
    border-radius: 50px;
    background: #f3e8ff;
    color: #6d28d9;
    font-weight: 500;
}
.chat-mock { max-width: 380px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.chat-bubble {
    max-width: 80%;
    padding: 9px 14px;
    border-radius: 14px;
    font-size: 0.8rem;
    line-height: 1.5;
}
.chat-bubble.user {
    align-self: flex-end;
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-bubble.bot {
    align-self: flex-start;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text);
    border-bottom-left-radius: 4px;
}
.chat-bubble.bot .chat-from { display: block; font-size: 0.64rem; font-weight: 700; color: #8661c5; margin-bottom: 3px; }

/* ----- Solution / ALM pipeline ----- */
.pipe-mock { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; justify-content: center; }
.pipe-stage {
    flex: 1;
    min-width: 120px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    padding: 14px 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.pipe-stage .pipe-icon {
    width: 38px; height: 38px;
    margin: 0 auto 8px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1rem;
    background: var(--primary);
}
.pipe-stage.dev .pipe-icon { background: #0078d4; }
.pipe-stage.test .pipe-icon { background: #8661c5; }
.pipe-stage.prod .pipe-icon { background: #107c10; }
.pipe-stage h5 { font-size: 0.8rem; color: var(--dark); margin-bottom: 2px; }
.pipe-stage p { font-size: 0.68rem; color: var(--text-light); margin: 0; }
.pipe-arrow { display: flex; align-items: center; color: var(--text-lighter); font-size: 1rem; padding: 0 8px; }

/* ----- Dark mode for mockups ----- */
body.dark-mode .ui-mock { background: #1e293b; border-color: #334155; }
body.dark-mode .ui-mock-chrome { background: #0f172a; border-color: #334155; }
body.dark-mode .ui-mock-body { background: #16233b; }
body.dark-mode .flow-node,
body.dark-mode .rel-entity,
body.dark-mode .schema-mock,
body.dark-mode .gallery-row,
body.dark-mode .topic-card,
body.dark-mode .chat-bubble.bot,
body.dark-mode .pipe-stage { background: #1e293b; border-color: #334155; }
body.dark-mode .flow-node-title,
body.dark-mode .gallery-title,
body.dark-mode .schema-col-name,
body.dark-mode .rel-entity,
body.dark-mode .pipe-stage h5 { color: #f1f5f9; }
body.dark-mode .device-screen { background: #1e293b; }
body.dark-mode .schema-row { border-color: #334155; }
body.dark-mode .col-type { background: rgba(0,120,212,0.2); color: #93c5fd; }
body.dark-mode .col-type.lookup { background: rgba(109,40,217,0.25); color: #c4b5fd; }
body.dark-mode .col-type.choice { background: rgba(146,64,14,0.25); color: #fcd34d; }
body.dark-mode .trigger-phrase { background: rgba(109,40,217,0.25); color: #c4b5fd; }

@media (max-width: 560px) {
    .pipe-arrow { transform: rotate(90deg); }
    .rel-link .rel-line { width: 30px; }
}

/* ============================================================
   PROMPT ENGINEERING MOCKUPS — CSS-only graphics
   (prompt quality ladder, habit grid, prompt diff,
    shot prompting, RAG pipeline, prompt composition,
    context-window chart)
   ============================================================ */

/* ----- Prompt quality ladder (3 columns: poor / better / best) ----- */
.prompt-ladder {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 1.75rem 0 0.5rem;
}
.ladder-step {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-top: 3px solid var(--border);
}
.ladder-step.poor { border-top-color: #d98a8d; }
.ladder-step.better { border-top-color: #e0b24d; }
.ladder-step.best { border-top-color: #5bb381; }
.ladder-head {
    padding: 10px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--off-white);
    border-bottom: 1px solid var(--border);
}
.ladder-step.poor .ladder-head { color: #be6066; }
.ladder-step.better .ladder-head { color: #a87c1a; }
.ladder-step.best .ladder-head { color: #2f8f5d; }
.ladder-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ladder-q, .ladder-a {
    font-size: 0.76rem;
    line-height: 1.5;
    border-radius: 8px;
    padding: 10px 12px;
}
.ladder-q { background: var(--off-white); border: 1px solid var(--border); color: var(--dark); }
.ladder-a { background: var(--primary-light); color: var(--primary-dark); }
.ladder-q b, .ladder-a b { display: block; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.7; margin-bottom: 3px; }
.ladder-traits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; margin-top: auto; }
.ladder-traits li { font-size: 0.72rem; color: var(--text-light); display: flex; align-items: center; gap: 7px; }
.ladder-step.poor .ladder-traits li i { color: #c2727a; }
.ladder-step.better .ladder-traits li i { color: #b88a2a; }
.ladder-step.best .ladder-traits li i { color: #3a9966; }

/* ----- Habit / concept grid (cards with number + icon) ----- */
.habit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 1.75rem 0 0.5rem;
}
.habit-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    padding: 18px 16px 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.habit-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}
.habit-num {
    position: absolute;
    top: 12px; right: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--border);
    line-height: 1;
}
.habit-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.05rem;
    margin-bottom: 12px;
}
.habit-card h5 { font-size: 0.9rem; color: var(--dark); margin: 0 0 6px; }
.habit-card p { font-size: 0.78rem; color: var(--text-light); margin: 0; line-height: 1.5; }

/* ----- Before / after prompt diff ----- */
.diff-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 1.75rem 0 0.5rem;
}
.diff-side {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}
.diff-tag {
    padding: 9px 14px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
}
.diff-side.before .diff-tag { background: #fbeeef; color: #b85a61; }
.diff-side.after .diff-tag { background: #ecf7f0; color: #2f8f5d; }
.diff-text {
    padding: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem;
    line-height: 1.6;
    color: var(--dark);
}
.diff-side.before .diff-text { background: rgba(190,96,102,0.05); }
.diff-side.after .diff-text { background: rgba(47,143,93,0.05); }
.diff-text em { color: var(--text-lighter); font-style: italic; }
.diff-text mark { background: #fff3bf; color: #3a2f00; padding: 0 2px; border-radius: 3px; }

/* ----- Shot prompting (0 / 1 / few examples) ----- */
.shot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 1.75rem 0 0.5rem;
}
.shot-col {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.shot-col-head {
    padding: 12px 14px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}
.shot-dots { display: flex; gap: 5px; justify-content: center; margin-bottom: 7px; }
.shot-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.shot-dots span.on { background: var(--primary); }
.shot-col-head h5 { font-size: 0.82rem; color: var(--dark); margin: 0; }
.shot-col-head small { font-size: 0.68rem; color: var(--text-light); }
.shot-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.shot-ex {
    font-size: 0.7rem;
    padding: 7px 10px;
    border-radius: 7px;
    background: var(--off-white);
    border: 1px dashed var(--border);
    color: var(--text-light);
    font-family: 'JetBrains Mono', monospace;
}
.shot-ex.task {
    border-style: solid;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: transparent;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

/* ----- RAG pipeline (horizontal stages with arrows) ----- */
.rag-pipe { display: flex; align-items: stretch; flex-wrap: wrap; justify-content: center; margin: 1.75rem 0 0.5rem; }
.rag-step {
    flex: 1;
    min-width: 130px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    padding: 16px 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
}
.rag-step .rag-num {
    position: absolute;
    top: -10px; left: 50%;
    transform: translateX(-50%);
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.rag-step .rag-icon {
    width: 40px; height: 40px;
    margin: 6px auto 8px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1rem;
}
.rag-step:nth-child(1) .rag-icon { background: #0078d4; }
.rag-step:nth-child(3) .rag-icon { background: #8661c5; }
.rag-step:nth-child(5) .rag-icon { background: #c98a00; }
.rag-step:nth-child(7) .rag-icon { background: #107c10; }
.rag-step h5 { font-size: 0.8rem; color: var(--dark); margin: 0 0 3px; }
.rag-step p { font-size: 0.68rem; color: var(--text-light); margin: 0; line-height: 1.45; }
.rag-arrow { display: flex; align-items: center; color: var(--primary); font-size: 1rem; padding: 0 6px; }

/* ----- Prompt composition stack (layers feeding final prompt) ----- */
.compose-stack { max-width: 520px; margin: 1.75rem auto 0.5rem; display: flex; flex-direction: column; align-items: center; }
.compose-layer {
    width: 100%;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    background: var(--white);
    padding: 11px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 8px;
}
.compose-layer .cl-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.9rem;
}
.compose-layer.system { border-left-color: #8661c5; }
.compose-layer.system .cl-icon { background: #ede9fe; color: #6d28d9; }
.compose-layer.rag { border-left-color: #c98a00; }
.compose-layer.rag .cl-icon { background: #fef3c7; color: #92400e; }
.cl-text { display: flex; flex-direction: column; line-height: 1.35; }
.cl-title { font-size: 0.8rem; font-weight: 600; color: var(--dark); }
.cl-sub { font-size: 0.7rem; color: var(--text-light); }
.compose-merge { color: var(--text-lighter); font-size: 1.1rem; margin: 2px 0 8px; }
.compose-final {
    width: 100%;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 13px 16px;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: var(--shadow-md);
    display: flex; align-items: center; justify-content: center; gap: 10px;
}

/* ----- Context-window bar chart ----- */
.ctx-bars { margin: 1.75rem 0 0.5rem; display: flex; flex-direction: column; gap: 12px; }
.ctx-bar { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 12px; }
.ctx-bar-label { font-size: 0.78rem; font-weight: 600; color: var(--dark); }
.ctx-bar-label small { display: block; font-size: 0.66rem; font-weight: 400; color: var(--text-light); }
.ctx-bar-track { background: var(--off-white); border: 1px solid var(--border); border-radius: 50px; height: 26px; overflow: hidden; position: relative; }
.ctx-bar-fill {
    height: 100%;
    border-radius: 50px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    min-width: 56px;
    white-space: nowrap;
}

/* ----- Dark mode for prompt-engineering mockups ----- */
body.dark-mode .ladder-step,
body.dark-mode .habit-card,
body.dark-mode .diff-side,
body.dark-mode .shot-col,
body.dark-mode .rag-step,
body.dark-mode .compose-layer { background: #1e293b; border-color: #334155; }
body.dark-mode .ladder-head { background: #0f172a; border-color: #334155; }
body.dark-mode .ladder-q { background: #0f172a; border-color: #334155; color: #f1f5f9; }
body.dark-mode .ladder-q b, body.dark-mode .ladder-a b { opacity: 0.85; }
body.dark-mode .ladder-a { background: rgba(0,120,212,0.2); color: #93c5fd; }
body.dark-mode .ladder-step.poor .ladder-head { color: #e09499; }
body.dark-mode .ladder-step.better .ladder-head { color: #d8b65a; }
body.dark-mode .ladder-step.best .ladder-head { color: #6fc498; }
body.dark-mode .diff-side.before .diff-tag { background: rgba(190,96,102,0.18); color: #e09499; border-color: #334155; }
body.dark-mode .diff-side.after .diff-tag { background: rgba(47,143,93,0.18); color: #6fc498; border-color: #334155; }
body.dark-mode .diff-side.before .diff-text { background: rgba(190,96,102,0.08); }
body.dark-mode .diff-side.after .diff-text { background: rgba(47,143,93,0.08); }
body.dark-mode .habit-card h5,
body.dark-mode .ladder-step h5,
body.dark-mode .shot-col-head h5,
body.dark-mode .rag-step h5,
body.dark-mode .cl-title { color: #f1f5f9; }
body.dark-mode .habit-num { color: #334155; }
body.dark-mode .habit-icon,
body.dark-mode .compose-layer .cl-icon { background: rgba(0,120,212,0.2); color: #93c5fd; }
body.dark-mode .diff-text { color: #f1f5f9; }
body.dark-mode .shot-col-head { border-color: #334155; }
body.dark-mode .shot-ex { background: #0f172a; border-color: #334155; }
body.dark-mode .shot-ex.task { background: rgba(0,120,212,0.2); color: #93c5fd; }
body.dark-mode .ctx-bar-label { color: #f1f5f9; }
body.dark-mode .ctx-bar-track { background: #0f172a; border-color: #334155; }

@media (max-width: 720px) {
    .prompt-ladder, .habit-grid, .shot-grid, .diff-block { grid-template-columns: 1fr; }
    .rag-arrow { transform: rotate(90deg); padding: 6px 0; }
    .ctx-bar { grid-template-columns: 1fr; gap: 5px; }
}

/* ============================================================
   RAG deep-dive series visuals
   (chunking, embeddings, vector space, similarity scores)
   ============================================================ */

/* ----- Document → chunks strip ----- */
.chunk-doc { display: flex; flex-direction: column; gap: 14px; }
.chunk-source {
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 14px 16px; font-size: 0.82rem; color: var(--text-light); line-height: 1.7;
}
.chunk-source .cs-label { display: block; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-lighter); font-weight: 700; margin-bottom: 6px; }
.chunk-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.chunk-block {
    flex: 1 1 150px; min-width: 0; background: var(--white);
    border: 1px solid var(--border); border-left: 4px solid var(--primary);
    border-radius: 8px; padding: 12px 14px;
}
.chunk-block:nth-child(4n+1) { border-left-color: #0078d4; }
.chunk-block:nth-child(4n+2) { border-left-color: #00b4d8; }
.chunk-block:nth-child(4n+3) { border-left-color: #8661c5; }
.chunk-block:nth-child(4n+4) { border-left-color: #107c10; }
.chunk-block .cb-tag { display: block; font-family: 'JetBrains Mono', monospace; font-size: 0.62rem; color: var(--text-lighter); margin-bottom: 5px; letter-spacing: 0.3px; }
.chunk-block .cb-text { font-size: 0.76rem; color: var(--text); line-height: 1.5; }
.chunk-block .cb-overlap { color: var(--primary); background: var(--primary-light); border-radius: 3px; padding: 0 2px; }

/* ----- Text → embedding vector rows ----- */
.embed-demo { display: flex; flex-direction: column; gap: 12px; margin: 0.5rem 0; }
.embed-line { display: grid; grid-template-columns: 1fr auto 1.5fr; align-items: center; gap: 12px; }
.embed-text {
    background: var(--white); border: 1px solid var(--border); border-radius: 8px;
    padding: 10px 14px; font-size: 0.82rem; color: var(--dark); font-weight: 600;
}
.embed-arrow { color: var(--primary); font-size: 1rem; text-align: center; }
.embed-vec {
    background: var(--dark); border-radius: 8px; padding: 10px 14px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: #7dd3fc;
    overflow-x: auto; white-space: nowrap;
}
.embed-vec .ev-dim { color: #f1f5f9; }

/* ----- 2D similarity space (scatter of points) ----- */
.vec-space {
    position: relative; height: 300px; background: var(--white);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    margin: 0.5rem 0; overflow: hidden;
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 40px 40px; background-position: -1px -1px;
}
.vec-point { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.vec-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(0,120,212,0.15); }
.vec-point.cluster-a .vec-dot { background: #0078d4; box-shadow: 0 0 0 4px rgba(0,120,212,0.15); }
.vec-point.cluster-b .vec-dot { background: #107c10; box-shadow: 0 0 0 4px rgba(16,124,16,0.15); }
.vec-point.cluster-c .vec-dot { background: #d13438; box-shadow: 0 0 0 4px rgba(209,52,56,0.15); }
.vec-point.query .vec-dot { background: #8661c5; width: 20px; height: 20px; box-shadow: 0 0 0 5px rgba(134,97,197,0.2); }
.vec-label { font-size: 0.7rem; font-weight: 600; color: var(--dark); background: var(--white); border: 1px solid var(--border); border-radius: 5px; padding: 1px 7px; white-space: nowrap; }

/* ----- Similarity score bars ----- */
.sim-rows { display: flex; flex-direction: column; gap: 10px; margin: 0.5rem 0; }
.sim-row { display: grid; grid-template-columns: 1fr 2fr auto; align-items: center; gap: 12px; }
.sim-doc { font-size: 0.8rem; color: var(--dark); font-weight: 600; }
.sim-doc small { display: block; font-size: 0.66rem; font-weight: 400; color: var(--text-light); }
.sim-track { background: var(--off-white); border: 1px solid var(--border); border-radius: 50px; height: 22px; overflow: hidden; }
.sim-fill { height: 100%; border-radius: 50px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.sim-row.match .sim-fill { background: linear-gradient(90deg, #0078d4, #00b4d8); }
.sim-row.weak .sim-fill { background: linear-gradient(90deg, #94a3b8, #cbd5e1); }
.sim-score { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; font-weight: 700; color: var(--primary); min-width: 42px; text-align: right; }
.sim-row.weak .sim-score { color: var(--text-lighter); }

/* ----- Dark mode ----- */
body.dark-mode .chunk-source,
body.dark-mode .chunk-block,
body.dark-mode .embed-text,
body.dark-mode .vec-space,
body.dark-mode .sim-track { background: #1e293b; border-color: #334155; }
body.dark-mode .chunk-block .cb-text,
body.dark-mode .embed-text { color: #f1f5f9; }
body.dark-mode .chunk-block .cb-overlap { background: rgba(0,120,212,0.25); color: #93c5fd; }
body.dark-mode .vec-space { background-color: #1e293b; background-image: linear-gradient(#334155 1px, transparent 1px), linear-gradient(90deg, #334155 1px, transparent 1px); }
body.dark-mode .vec-label { background: #0f172a; border-color: #334155; color: #f1f5f9; }
body.dark-mode .sim-doc { color: #f1f5f9; }
body.dark-mode .sim-track { background: #0f172a; }

@media (max-width: 720px) {
    .embed-line { grid-template-columns: 1fr; gap: 6px; }
    .embed-arrow { transform: rotate(90deg); }
    .sim-row { grid-template-columns: 1fr; gap: 5px; }
    .vec-space { height: 340px; }
}

/* ============================================================
   AGENT REGISTRY INFOGRAPHIC — "Programmatic access" summary
   (title + subtitle, task pills, two numbered task cards)
   ============================================================ */
.agent-info {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-md);
    padding: 26px 26px 28px;
    margin: 1.9rem 0 0.6rem;
    overflow: hidden;
    position: relative;
}
.agent-info::before {
    content: '';
    position: absolute;
    top: -40%; right: -12%;
    width: 340px; height: 340px;
    background: radial-gradient(circle, rgba(0,120,212,0.10) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.agent-info-head { position: relative; z-index: 1; }
.agent-info-badge {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid rgba(0,120,212,0.2);
    padding: 4px 11px; border-radius: 50px;
    margin-bottom: 12px;
}
.agent-info-head h3 {
    font-size: 1.4rem; font-weight: 800; letter-spacing: -0.5px; line-height: 1.25;
    color: var(--dark); margin: 0 0 8px;
}
.agent-info-head p.agent-info-sub {
    font-size: 0.95rem; line-height: 1.6; margin: 0 0 4px; max-width: 640px;
    font-weight: 600;
    background: linear-gradient(90deg, var(--primary), #8661c5);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.agent-info-tasks-label {
    position: relative; z-index: 1;
    font-size: 0.9rem; color: var(--text); margin: 18px 0 12px; font-weight: 600;
}
.agent-info-pills { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.agent-info-pill {
    display: inline-flex; align-items: center; gap: 9px;
    background: var(--off-white); border: 1px solid var(--border);
    border-radius: 50px; padding: 8px 15px 8px 10px;
    font-size: 0.82rem; font-weight: 600; color: var(--dark);
}
.agent-info-pill i {
    width: 26px; height: 26px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary); color: #fff; font-size: 0.74rem; flex-shrink: 0;
}
.agent-info-pill:nth-child(2) i { background: #8661c5; }
.agent-info-pill:nth-child(3) i { background: #107c10; }
.agent-info-cards { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.agent-info-card {
    display: flex; gap: 14px; align-items: flex-start;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--off-white); padding: 18px 18px 18px 16px;
    border-top: 3px solid var(--primary);
}
.agent-info-card:nth-child(2) { border-top-color: #00b4d8; }
.agent-info-card .aic-icon {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.05rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: var(--shadow-sm);
}
.agent-info-card:nth-child(2) .aic-icon { background: linear-gradient(135deg, #00b4d8, #0078d4); }
.agent-info-card .aic-body { display: flex; flex-direction: column; gap: 3px; }
.agent-info-card .aic-num {
    font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; font-weight: 700;
    color: var(--primary); letter-spacing: 1px;
}
.agent-info-card .aic-title { font-size: 0.92rem; font-weight: 700; color: var(--dark); line-height: 1.35; }
.agent-info-card .aic-sub { font-size: 0.76rem; color: var(--text-light); line-height: 1.45; }
.agent-info-card code {
    font-family: 'JetBrains Mono', monospace; font-size: 0.68rem;
    background: var(--primary-light); color: var(--primary-dark);
    padding: 1px 5px; border-radius: 4px; margin-top: 3px; align-self: flex-start;
}

body.dark-mode .agent-info { background: #1e293b; border-color: #334155; }
body.dark-mode .agent-info-head h3,
body.dark-mode .agent-info-pill,
body.dark-mode .agent-info-card .aic-title { color: #f1f5f9; }
body.dark-mode .agent-info-tasks-label { color: #cbd5e1; }
body.dark-mode .agent-info-pill,
body.dark-mode .agent-info-card { background: #16233b; border-color: #334155; }
body.dark-mode .agent-info-card code { background: rgba(0,120,212,0.25); color: #93c5fd; }

@media (max-width: 640px) {
    .agent-info-cards { grid-template-columns: 1fr; }
    .agent-info-head h3 { font-size: 1.2rem; }
}
