/* ==========================================================================
   KNOWLEDGE HUB - MASTER STYLESHEET (STORYPROCESS INTEGRATED)
   Updated: 2026 Brand Alignment (Purple & White)
   ========================================================================== */
:root {
    --brand-purple: #7844ff; /* From storyproc logo/nav */
    --brand-lavender: #b599ff;

    --brand-purple-dark: #5B2ED6;
    --charcoal: #2C225A;

    --navy: #1A1A2E;
    --slate: #444444;
    --light-gray: #F8F9FA;
    --border-color: #BBBBBB;
    --font-serif: "Georgia", serif;
    --font-sans: "Arial", sans-serif;
}

/* 1. CORE DEFAULTS - Updated to StoryProcess Brand Typography */
body {
    font-family: "Proxima Nova", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
    line-height: 1.6;
    color: #4a415e; /* StoryProcess Dark Slate Purple */
    background-color: #ffffff;
}

/* 2. SP-GLOBAL HEADER & LAYOUT */
.sp-global-header {
    border-bottom: 1px solid #e9e5f0;
    padding: 15px 0;
    background: #ffffff;
}

.sp-global-header .sp-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.sp-main-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.sp-main-nav ul li a {
    color: #4a415e;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.sp-main-nav ul li a:hover {
    color: #7844ff;
}

.sp-logo img {
    height: 35px;
    width: auto;
}

.sp-btn-primary {
    background-color: #7844ff;
    color: white !important;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.sp-btn-primary:hover {
    background-color: #714a94;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--brand-purple-dark); /* Matched to storyproc branding */
    font-family: var(--font-sans);
    font-weight: normal;
    font-size: 1rem;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--brand-lavender);
}

@media (max-width: 1024px) {
    .main-nav a {
        font-size: 0.9rem; /* Slightly smaller font for mid-size screens */
    }
}

/* Mid-size screen adjustment */
@media (max-width: 1100px) {
    .main-nav ul {
        gap: 12px;
    }
    .main-nav a {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    .site-header .container { flex-direction: column; gap: 15px; }
    .main-nav ul { gap: 15px; flex-wrap: wrap; justify-content: center; }
    .footer-simple-grid {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    .footer-nav-links a {
        margin: 0 10px;
    }
}

.site-header {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo img {
    height: 35px; /* Adjusted based on nav height */
    width: auto;
    display: block;
}

/* 3. BUYER ENABLEMENT HOME PAGE */
.hub-home-hero {
    text-align: left;
    padding: 60px 40px;
    background: linear-gradient(135deg, #1A1A2E 0%, #2C225A 100%);
    color: var(--brand-lavender);
    border-radius: 12px;
    margin-bottom: 40px;
}
.hub-home-hero h1 { font-size: 2.8rem; font-weight: 800; margin-bottom: 10px; color: var(--brand-lavender); }
.hub-tagline { font-size: 1.15rem; color: #f3f0f7; font-weight: 400; }

.hub-enablement-note { 
    font-size: 1rem; 
    color: #4a415e; 
    margin-top: 20px; 
    font-weight: 600; 
    border-top: 1px solid #e9e5f0;
    padding-top: 20px;
}

.hub-trunk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}
.hub-trunk-card {
    background: #ffffff;
    border: 1px solid #e9e5f0;
    padding: 25px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hub-trunk-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(142, 103, 177, 0.1);
    border-color: #7844ff; 
}
.hub-card-cta { 
    display: block; 
    margin-top: 15px; 
    font-weight: 800; 
    color: #7844ff; 
    font-size: 0.85rem; 
    text-transform: uppercase;
}

/* 4. NAVIGATION COMPONENTS */
.hub-breadcrumbs { 
    font-size: 0.85rem; 
    margin-bottom: 25px; 
    color: #938ca1; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}
.hub-breadcrumbs a { 
    text-decoration: none; 
    color: #7844ff; 
    font-weight: 600; 
    transition: all 0.2s ease; 
}
.hub-breadcrumbs a:hover { color: #714a94; }
.hub-breadcrumb-current { color: #4a415e; font-weight: 800; pointer-events: none; }

.hub-sub-nav { margin: 30px 0; padding: 20px; background: #ffffff; border: 1px solid #e9e5f0; border-radius: 8px; }
.hub-sub-nav h2 { margin-top: 0; font-size: 1.25rem; font-weight: 800; color: #4a415e; }

.hub-anchor-nav { 
    background: #f8f7fa; 
    padding: 12px 20px; 
    border-radius: 8px; 
    margin-bottom: 25px; 
    font-size: 0.95rem; 
    border: 1px solid #e9e5f0; 
}
.hub-anchor-nav a { color: #7844ff; text-decoration: none; margin-right: 15px; font-weight: 700; }

/* 5. CONTENT HIERARCHY */
.hub-headline { font-size: 2.4rem; font-weight: 800; color: #4a415e; line-height: 1.2; margin-bottom: 1rem; }
.hub-intro { font-size: 1.25rem; color: #6b647d; margin-bottom: 20px; }
.hub-scope {
    background: #fdfcff;
    padding: 15px 20px;
    border-left: 5px solid #7844ff;
    margin: 25px 0;
    font-style: italic;
    color: #4a415e;
}

/* 6. DIAGNOSTIC RED FLAGS */
.hub-signals { list-style: none; padding: 0; margin-bottom: 30px; }
.hub-signals li { 
    padding: 12px 18px; background: #fff5f5; border-left: 4px solid #feb2b2; 
    margin-bottom: 10px; border-radius: 0 4px 4px 0; font-weight: 600; color: #c53030;
}

/* 7. ACCORDIONS & ANIMATIONS */
details { margin-bottom: 15px; border-radius: 8px; overflow: hidden; background: #ffffff; border: 1px solid #e9e5f0; }
summary { padding: 16px 20px; cursor: pointer; font-weight: 700; color: #4a415e; background: #fdfcff; outline: none; }
.hub-qa-id { font-weight: 600 !important; font-size: 0.8rem !important; color: #938ca1; margin-right: 8px; }

.hub-qa-content, .hub-concept-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding 0.3s ease;
}
details[open] > .hub-qa-content, 
details[open] > .hub-concept-content {
    max-height: 5000px; 
    padding: 24px;
    border-top: 1px solid #e9e5f0;
}

/* 8. Q&A DEMARCATION */
.hub-id-badge {
    display: inline-block; font-size: 0.75rem; font-weight: 700; background: #f3f0f7; color: #7844ff; padding: 3px 8px; border-radius: 4px; margin-right: 10px;
}
.geo-question {
    font-size: 1rem; color: #4a415e; background: #ffffff; padding: 20px; border-radius: 8px; border-left: 5px solid #7844ff; margin-bottom: 24px; line-height: 1.5; border: 1px solid #e9e5f0;
}
.geo-question::before {
    content: "BUYER CONCERN"; display: block; font-size: 0.8rem; font-weight: 800; color: #7844ff; margin-bottom: 12px; letter-spacing: 0.1em;
}

/* 9. GLOSSARY & PILLS */
.hub-page-glossary { margin-top: 60px; padding-top: 40px; border-top: 2px solid #e9e5f0; }
.hub-glossary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.hub-glossary-mini-card { background: #ffffff; padding: 18px; border-radius: 8px; border: 1px solid #e9e5f0; transition: all 0.2s ease; }

.hub-term { color: #7844ff; border-bottom: 1.5px dotted #7844ff; cursor: help; font-weight: 600; }
.pill { padding: 5px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }
/* Minimal correction for Pills and Alignment */
.pill-neutral {
    background: #f3f0f7;
    color: #7844ff;
    border: 1px solid #e9e5f0;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
    margin: 4px;
}

/* Ensure all pill variants are styled */
.pill-synonym, .pill-vernacular {
    background: #f3f0f7;
    color: #7844ff;
    border: 1px solid #e9e5f0;
    padding: 3px 10px;
    border-radius: 15px;
    margin-left: 5px;
    font-weight: 600;
}

/* 10. GLOBAL FOOTER */
.sp-global-footer {
    margin-top: 80px;
    padding: 40px 0;
    border-top: 1px solid #e9e5f0;
    background: #fdfcff;
    color: #938ca1;
}
.sp-global-footer .sp-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}
.sp-footer-grid { display: flex; justify-content: space-between; align-items: center; }
.sp-footer-links a { color: #7844ff; text-decoration: none; font-weight: 600; margin-left: 20px; }

/* Simplified & Unified Footer Styles */
.site-footer {
    background: var(--navy); /* #1A1A2E */
    color: #ffffff;
    padding: 40px 0 30px;
    margin-top: 60px;
}

.footer-simple-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle divider */
    margin-bottom: 15px;
}

.footer-nav-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-left: 25px;
    font-size: 0.9rem;
    font-family: var(--font-sans); /* Unified to Arial */
    transition: color 0.2s;
}

.footer-nav-links a:hover {
    color: var(--brand-lavender); /* #b599ff */
}

.footer-bottom p {
    font-family: var(--font-sans); /* Fix from serif to sans-serif */
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0;
}


/* Fix for Use Case Pills */
.hub-use-case-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

/* Fix for Glossary Card Formatting */
.glossary-card h3 {font-family: var(--font-sans); font-size: 1.2rem; font-weight: normal; color: var(--brand-purple-dark);}

/* Fix for Standalone Glossary Alignment */
.hub-container {
    display: block !important; 
    max-width: 1100px !important;
    margin: 40px auto !important;
    padding: 0 20px;
    text-align: left;
}


/* Ensure variants don't overflow or stack weirdly */
.glossary-variants {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f8f7fa;
}

/* Individual glossary card */
.glossary-card {
    background: #ffffff;
    border: 1px solid #e9e5f0;      /* StoryProc border tone */
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 12px;
}

/* Glossary variant labels */
.glossary-variants strong {
    font-size: 0.85rem;
    color: #6b647d;                  /* secondary text tone */
    min-width: 150px;
    font-weight: 700;
}

.hub-glossary-term { 
    font-weight: 700; 
    color: #7844ff; 
    font-size: 0.95rem; 
    margin-bottom: 5px; 
    text-decoration: none; 
}

.hub-glossary-desc {
    font-size: 0.8rem;
    color: #6b647d;
    line-height: 1.3;
}

.hub-glossary-card-link { 
    text-decoration: none !important; 
    color: inherit; 
    display: block; 
}

.hub-glossary-card-link:hover .hub-glossary-mini-card { border-color: #7844ff; background-color: #fcfaff; transform: translateY(-3px); }

.answer p { margin-bottom: 1.2rem; color: #6b647d; }
.answer p:first-of-type { font-weight: 600; color: #4a415e; }
.answer img { max-width: 100%; height: auto; border-radius: 8px; margin: 15px 0; border: 1px solid #e9e5f0; }

/* Sitemap top-nav indicator */
.hub-breadcrumbs a[href*="sitemap.html"] {
    color: #7844ff;        /* StoryProc primary purple */
    font-weight: 800;
    border-right: 1px solid #e9e5f0;
    padding-right: 10px;
    margin-right: 5px;
}

/* Reduce vertical gap between sitemap branches */
.hub-sitemap-tree .hub-concept-accordion {
    margin-bottom: 4px !important;
}

.hub-sitemap-tree .hub-concept-content {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

/* Branch link styling */
.sitemap-branch-link {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    margin-right: 10px;
}

.sitemap-branch-link:hover {
    color: #7844ff;   /* StoryProc hover accent */
    text-decoration: underline;
}

/* Prevent summary toggle conflict when clicking branch links */
summary a {
    position: relative;
    z-index: 10;
}