
        :root {
            --primary: #2563eb;
            --primary-light: #dbeafe;
            --primary-dark: #1e40af;
            --border: #e5e7eb;
            --bg: #f9fafb;
            --bg-surface: #ffffff;
            --text: #111827;
            --text-secondary: #6b7280;
            --success: #10b981;
            --error: #ef4444;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: var(--bg);
            color: var(--text);
            line-height: 1.6;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 60px 20px;
        }

        /* HEADER & NAVIGATION */
        .navbar {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            background: var(--bg-surface);
            border-bottom: 1px solid var(--border);
            z-index: 100;
            padding: 16px 0;
        }

        .navbar-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 24px;
            font-weight: 700;
            color: var(--primary);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .nav-buttons {
            display: flex;
            gap: 12px;
        }

        .nav-btn {
            padding: 8px 16px;
            background: none;
            border: 1px solid var(--border);
            border-radius: 6px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 500;
            transition: all 0.2s;
            color: var(--text);
        }

        .nav-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
        }

        .nav-btn.primary {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }

        .nav-btn.primary:hover {
            background: var(--primary-dark);
        }

        /* HERO SECTION */
        .hero {
            text-align: center;
            margin-top: 80px;
            margin-bottom: 60px;
        }

        .hero-logo {
            width: 120px;
            height: 120px;
            margin: 0 auto 32px;
            object-fit: contain;
        }

        .hero-title {
            font-size: 48px;
            font-weight: 700;
            margin-bottom: 16px;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .hero-subtitle {
            font-size: 20px;
            color: var(--text-secondary);
            margin-bottom: 48px;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }

        /* SEARCH & FILTERS */
        .search-section {
            margin-bottom: 60px;
        }

        .search-box {
            display: flex;
            gap: 12px;
            margin-bottom: 20px;
        }

        .search-input-wrapper {
            flex: 1;
            position: relative;
        }

        .search-input {
            width: 100%;
            padding: 16px 20px;
            padding-left: 44px;
            border: 1px solid var(--border);
            border-radius: 8px;
            font-size: 16px;
            transition: all 0.2s;
            background: var(--bg-surface);
        }

        .search-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px var(--primary-light);
        }

        .search-icon {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-secondary);
            font-size: 18px;
        }

        .filter-btn {
            padding: 16px 24px;
            background: var(--bg-surface);
            border: 1px solid var(--border);
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 8px;
            white-space: nowrap;
        }

        .filter-btn:hover {
            border-color: var(--primary);
            background: var(--primary-light);
        }

        .filters {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
        }

        .filter-tag {
            padding: 8px 12px;
            background: var(--primary-light);
            border: 1px solid var(--primary);
            border-radius: 20px;
            font-size: 12px;
            color: var(--primary);
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .filter-tag:hover {
            background: var(--primary);
            color: white;
        }

        .filter-tag.active {
            background: var(--primary);
            color: white;
        }

        .filter-tag-remove {
            cursor: pointer;
            font-weight: bold;
        }

        /* CAROUSEL */
        .carousel-section {
            margin-bottom: 80px;
        }

        .section-title {
            font-size: 24px;
            font-weight: 700;
            margin-bottom: 24px;
            color: var(--text);
        }

        .carousel-container {
            position: relative;
            overflow: hidden;
        }

        .carousel {
            display: flex;
            gap: 20px;
            overflow-x: auto;
            scroll-behavior: smooth;
            padding: 12px 0;
            scroll-padding: 0 20px;
        }

        .carousel::-webkit-scrollbar {
            height: 8px;
        }

        .carousel::-webkit-scrollbar-track {
            background: var(--bg);
            border-radius: 10px;
        }

        .carousel::-webkit-scrollbar-thumb {
            background: var(--border);
            border-radius: 10px;
        }

        .carousel::-webkit-scrollbar-thumb:hover {
            background: var(--text-secondary);
        }

        .wiki-card {
            flex: 0 0 280px;
            background: var(--bg-surface);
            border: 1px solid var(--border);
            border-radius: 12px;
            overflow: hidden;
            transition: all 0.3s;
            cursor: pointer;
            display: flex;
            flex-direction: column;
        }

        .wiki-card:hover {
            border-color: var(--primary);
            box-shadow: 0 10px 30px rgba(37, 99, 235, 0.1);
            transform: translateY(-4px);
        }

        .wiki-image {
            width: 100%;
            height: 160px;
            background: linear-gradient(135deg, var(--primary-light) 0%, #e0e7ff 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 48px;
            font-weight: 700;
            color: var(--primary);
            overflow: hidden;
            position: relative;
        }

        .wiki-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .wiki-content {
            padding: 16px;
            display: flex;
            flex-direction: column;
            flex: 1;
        }

        .wiki-title {
            font-size: 16px;
            font-weight: 600;
            color: var(--text);
            margin-bottom: 8px;
            line-height: 1.4;
        }

        .wiki-description {
            font-size: 12px;
            color: var(--text-secondary);
            margin-bottom: 12px;
            flex: 1;
            line-height: 1.5;
        }

        .wiki-stats {
            display: flex;
            gap: 12px;
            padding-top: 12px;
            border-top: 1px solid var(--border);
            font-size: 12px;
        }

        .wiki-stat {
            display: flex;
            align-items: center;
            gap: 4px;
            color: var(--text-secondary);
        }

        .wiki-stat-value {
            font-weight: 600;
            color: var(--primary);
        }

        /* CAROUSEL BUTTONS */
        .carousel-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 40px;
            height: 40px;
            background: var(--bg-surface);
            border: 1px solid var(--border);
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            z-index: 10;
            transition: all 0.2s;
        }

        .carousel-btn:hover {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }

        .carousel-btn.prev {
            left: 0;
        }

        .carousel-btn.next {
            right: 0;
        }

        /* FEATURED SECTION */
        .featured-section {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: white;
            border-radius: 16px;
            padding: 60px 40px;
            text-align: center;
            margin-bottom: 80px;
        }

        .featured-title {
            font-size: 32px;
            font-weight: 700;
            margin-bottom: 16px;
        }

        .featured-description {
            font-size: 18px;
            margin-bottom: 32px;
            opacity: 0.9;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }

        .featured-btn {
            padding: 14px 32px;
            background: white;
            color: var(--primary);
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .featured-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        }

        /* RESPONSIVE */
        @media (max-width: 768px) {
            .hero-title {
                font-size: 36px;
            }

            .hero-subtitle {
                font-size: 16px;
            }

            .hero-logo {
                width: 80px;
                height: 80px;
            }

            .wiki-card {
                flex: 0 0 240px;
            }

            .carousel-btn {
                width: 32px;
                height: 32px;
                font-size: 16px;
            }

            .featured-section {
                padding: 40px 24px;
            }

            .featured-title {
                font-size: 24px;
            }

            .featured-description {
                font-size: 16px;
            }

            .nav-buttons {
                gap: 8px;
            }

            .nav-btn {
                padding: 6px 12px;
                font-size: 12px;
            }
        }

        /* Modal Shared Styles (if not already included) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--surface);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal.modal-xl {
    max-width: 900px;
}

.modal-head {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-head h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-foot {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-light);
    flex-shrink: 0;
}

.btn-icon:hover {
    background: var(--bg);
}

/* Wiki Type Selector */
.wiki-type-selector {
    margin-top: 24px;
}

.wiki-type-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.wiki-type-card {
    display: block;
    cursor: pointer;
}

.wiki-type-card input[type="radio"] {
    display: none;
}

.type-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    transition: all 0.2s;
}

.wiki-type-card:hover .type-content {
    border-color: var(--primary);
    background: var(--primary-light);
}

.wiki-type-card input[type="radio"]:checked ~ .type-content {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.type-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.type-icon svg {
    color: var(--primary);
}

.type-info {
    flex: 1;
}

.type-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.type-description {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.4;
}

/* Form Select Main */
.form-select-main {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--surface);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.form-select-main:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Suggested Tags */
.suggested-tags {
    margin-top: 20px;
}

.suggested-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.suggested-tag {
    padding: 6px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 12px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.suggested-tag:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* Related Wikis Search */
.related-wikis-search {
    margin-top: 24px;
}

.related-wikis-results {
    margin-top: 12px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: none;
}

.related-wikis-results.active {
    display: block;
}

/* Content Approach Selector */
.content-approach-selector {
    margin-bottom: 24px;
}

.content-approach-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.content-approach-card {
    display: block;
    cursor: pointer;
}

.content-approach-card input[type="radio"] {
    display: none;
}

.approach-content {
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    transition: all 0.2s;
    text-align: center;
    height: 100%;
}

.content-approach-card:hover .approach-content {
    border-color: var(--primary);
    background: var(--primary-light);
}

.content-approach-card input[type="radio"]:checked ~ .approach-content {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.approach-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.approach-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.approach-description {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.4;
}

/* Template Grid */
.template-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.template-card {
    display: block;
    cursor: pointer;
}

.template-card input[type="radio"] {
    display: none;
}

.template-preview {
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    transition: all 0.2s;
}

.template-card:hover .template-preview {
    border-color: var(--primary);
    background: var(--primary-light);
}

.template-card input[type="radio"]:checked ~ .template-preview {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.template-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.template-sections {
    font-size: 11px;
    color: var(--text-light);
    line-height: 1.5;
}

/* License Selection */
.license-selection {
    margin-top: 24px;
}

/* Next Steps Box */
.next-steps-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    text-align: left;
}

.next-steps-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.next-steps-list {
    margin: 0;
    padding-left: 20px;
    font-size: 12px;
    color: var(--text-light);
}

.next-steps-list li {
    margin-bottom: 4px;
}

/* Wiki Create Steps */
.wiki-create-step {
    display: none;
}

.wiki-create-step.active {
    display: block;
    animation: fadeIn 0.3s;
}

/* Responsive */
@media (max-width: 768px) {
    .content-approach-options {
        grid-template-columns: 1fr;
    }
    
    .template-grid {
        grid-template-columns: 1fr;
    }
    
    .wiki-type-options {
        gap: 10px;
    }
    
    .type-content {
        padding: 12px;
    }
}

/* Button utilities */
.btn-secondary {
    padding: 10px 20px;
    background: var(--bg-surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.btn-primary {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-full {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
}

.btn-full:hover {
    background: var(--primary-dark);
}

.btn-full-secondary {
    width: 100%;
    padding: 12px;
    background: var(--surface);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
}

.btn-full-secondary:hover {
    background: var(--primary-light);
}

/* ============================================================================
   MODAL & FORM STYLES FOR WIKI CREATION
   ============================================================================ */

:root {
    --primary: #2563eb;
    --primary-light: #dbeafe;
    --primary-dark: #1e40af;
    --border: #e5e7eb;
    --bg: #f9fafb;
    --surface: #ffffff;
    --text: #111827;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    --success: #10b981;
    --error: #ef4444;
}

/* Modal Overlay & Container */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--surface);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal.modal-xl {
    max-width: 900px;
}

.modal-head {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-head h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-foot {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-light);
    flex-shrink: 0;
}

.btn-icon:hover {
    background: var(--bg);
}

/* Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-light);
    transition: all 0.3s;
}

.step-item.active .step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.step-item.completed .step-number {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-lighter);
    white-space: nowrap;
}

.step-item.active .step-label {
    color: var(--text);
    font-weight: 600;
}

.step-connector {
    width: 80px;
    height: 2px;
    background: var(--border);
    margin: 0 8px;
    margin-bottom: 24px;
}

/* Wiki Create Steps */
.wiki-create-step {
    display: none;
}

.wiki-create-step.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-label-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.label-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.label-required {
    font-size: 11px;
    color: var(--error);
    background: #fee2e2;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.label-optional {
    font-size: 11px;
    color: var(--text-light);
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.form-input-main {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    font-family: inherit;
}

.form-input-main:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-textarea-main {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s;
}

.form-textarea-main:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.input-helper {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
}

.form-select-main {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--surface);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.form-select-main:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Wiki Type Selector */
.wiki-type-selector {
    margin-top: 24px;
}

.wiki-type-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.wiki-type-card {
    display: block;
    cursor: pointer;
}

.wiki-type-card input[type="radio"] {
    display: none;
}

.type-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    transition: all 0.2s;
}

.wiki-type-card:hover .type-content {
    border-color: var(--primary);
    background: var(--primary-light);
}

.wiki-type-card input[type="radio"]:checked ~ .type-content {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.type-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.type-icon svg {
    color: var(--primary);
}

.type-info {
    flex: 1;
}

.type-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.type-description {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.4;
}

/* Tag Input */
.tag-input-wrapper {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    background: var(--surface);
    min-height: 50px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.tag button {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.tag-input {
    width: 100%;
    border: none;
    outline: none;
    padding: 4px;
    font-size: 14px;
    font-family: inherit;
}

/* Suggested Tags */
.suggested-tags {
    margin-top: 20px;
}

.suggested-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.suggested-tag {
    padding: 6px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 12px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.suggested-tag:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* Content Approach Selector */
.content-approach-selector {
    margin-bottom: 24px;
}

.content-approach-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.content-approach-card {
    display: block;
    cursor: pointer;
}

.content-approach-card input[type="radio"] {
    display: none;
}

.approach-content {
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    transition: all 0.2s;
    text-align: center;
    height: 100%;
}

.content-approach-card:hover .approach-content {
    border-color: var(--primary);
    background: var(--primary-light);
}

.content-approach-card input[type="radio"]:checked ~ .approach-content {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.approach-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.approach-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.approach-description {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.4;
}

/* Template Grid */
.template-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.template-card {
    display: block;
    cursor: pointer;
}

.template-card input[type="radio"] {
    display: none;
}

.template-preview {
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    transition: all 0.2s;
}

.template-card:hover .template-preview {
    border-color: var(--primary);
    background: var(--primary-light);
}

.template-card input[type="radio"]:checked ~ .template-preview {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.template-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.template-sections {
    font-size: 11px;
    color: var(--text-light);
    line-height: 1.5;
}

/* Privacy Settings */
.privacy-settings {
    margin-bottom: 32px;
}

.privacy-settings h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.privacy-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.privacy-option-card {
    display: block;
    cursor: pointer;
}

.privacy-option-card input[type="radio"] {
    display: none;
}

.privacy-content {
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    transition: all 0.2s;
}

.privacy-option-card:hover .privacy-content {
    border-color: var(--primary);
    background: var(--primary-light);
}

.privacy-option-card input[type="radio"]:checked ~ .privacy-content {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.privacy-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.privacy-header svg {
    color: var(--primary);
    flex-shrink: 0;
}

.privacy-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.privacy-subtitle {
    font-size: 12px;
    color: var(--text-light);
}

.privacy-features {
    margin: 0;
    padding-left: 44px;
    list-style: none;
}

.privacy-features li {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.8;
    position: relative;
}

.privacy-features li::before {
    content: '✓';
    position: absolute;
    left: -18px;
    color: var(--primary);
    font-weight: 700;
}

/* Collaboration Settings */
.collaboration-settings {
    margin-bottom: 24px;
}

.collaboration-settings h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.toggle-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-option:hover {
    background: var(--surface);
    border-color: var(--primary);
}

.toggle-info {
    flex: 1;
}

.toggle-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.toggle-description {
    font-size: 12px;
    color: var(--text-light);
}

.toggle-input {
    width: 44px;
    height: 24px;
    position: relative;
    appearance: none;
    background: var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s;
    flex-shrink: 0;
}

.toggle-input:checked {
    background: var(--primary);
}

.toggle-input::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

.toggle-input:checked::before {
    transform: translateX(20px);
}

/* Attribution Info */
.attribution-info {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: var(--bg);
    border-left: 3px solid var(--primary);
    border-radius: 0 6px 6px 0;
    margin-top: 24px;
}

.attribution-info svg {
    color: var(--primary);
    flex-shrink: 0;
}

.attribution-info strong {
    display: block;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 4px;
}

.attribution-info p {
    font-size: 12px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

/* Success Modal */
.success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.next-steps-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    text-align: left;
    margin-bottom: 16px;
}

.next-steps-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.next-steps-list {
    margin: 0;
    padding-left: 20px;
    font-size: 12px;
    color: var(--text-light);
}

.next-steps-list li {
    margin-bottom: 4px;
}

/* License Selection */
.license-selection {
    margin-top: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .step-indicator {
        padding: 0 12px 20px;
    }
    
    .step-label {
        font-size: 10px;
    }
    
    .step-connector {
        width: 40px;
    }
    
    .content-approach-options {
        grid-template-columns: 1fr;
    }
    
    .template-grid {
        grid-template-columns: 1fr;
    }
    
    .wiki-type-options {
        gap: 10px;
    }
    
    .type-content {
        padding: 12px;
    }
    
    .modal.modal-xl {
        max-width: 100%;
    }
}
/* =====================================================================
   KB HOME — Topic grid layout (replaces carousel)
   ===================================================================== */

/* ── Featured banner ── */
.kb-featured-banner {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: #fff;
}
.kb-featured-banner__label { flex: 0 0 auto; }
.kb-featured-banner__body  { flex: 1; min-width: 220px; }
.kb-featured-banner__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: #fff;
}
.kb-featured-banner__summary {
    font-size: 0.875rem;
    color: #bfdbfe;
    margin: 0;
    line-height: 1.5;
}
.kb-featured-banner__cta  { flex: 0 0 auto; }
.kb-featured-banner__btn {
    display: inline-block;
    background: #fff;
    color: #1e3a5f;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}
.kb-featured-banner__btn:hover { background: #dbeafe; }

/* ── Live badge ── */
.kb-live-badge {
    display: inline-block;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    text-transform: uppercase;
    line-height: 1;
}
.kb-live-badge--sm {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    font-size: 0.65rem;
}

/* ── Result count ── */
.kb-result-count {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin-bottom: 1rem;
    text-align: right;
}

/* ── Topic grid ── */
.kb-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

/* ── Topic card ── */
.kb-topic-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s, transform 0.1s;
}
.kb-topic-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.kb-topic-card__hero {
    height: 90px;
    position: relative;
    flex: 0 0 auto;
}
.kb-topic-card__hero-label {
    position: absolute;
    bottom: 0.4rem;
    left: 0.5rem;
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
}
.kb-topic-card__body {
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.kb-topic-card__cat {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #2563eb;
    margin-bottom: 0.3rem;
}
.kb-topic-card__title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 0.4rem;
}
.kb-topic-card__summary {
    font-size: 0.8125rem;
    color: #475569;
    line-height: 1.5;
    flex: 1;
    margin: 0 0 0.6rem;
}
.kb-topic-card__summary--empty {
    color: #94a3b8;
    font-style: italic;
}
.kb-topic-card__meta {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    font-size: 0.72rem;
    color: #94a3b8;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.5rem;
    margin-top: auto;
}

/* ── Empty search state ── */
.kb-empty-search {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .kb-featured-banner { flex-direction: column; gap: 1rem; padding: 1.25rem; }
    .kb-topic-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .kb-topic-card__hero { height: 70px; }
}
@media (max-width: 400px) {
    .kb-topic-grid { grid-template-columns: 1fr; }
}

.kb-topic-card__title a {
    text-decoration: none;
    color: inherit;
}
.kb-topic-card__title a:hover { color: #2563eb; }

.kb-topic-card__cta {
    display: inline-block;
    margin-top: 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}
.kb-topic-card__cta:hover { text-decoration: underline; }

/* =====================================================================
   KB HOME v2 — grid layout, d-nav compatible
   ===================================================================== */

.kb-home-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 60px;
}

.kb-home-hero {
    text-align: center;
    margin-bottom: 2.5rem;
}
.kb-home-hero__icon {
    max-width: 100px;
    margin-bottom: 1rem;
}
.kb-home-hero__title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.5rem;
}
.kb-home-hero__sub {
    font-size: 1rem;
    color: #64748b;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

.kb-home-search-row {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.kb-home-search {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.kb-home-search:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px #dbeafe; }

.kb-home-cats {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.kb-cat-btn {
    padding: 0.35rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #fff;
    font-size: 0.8125rem;
    cursor: pointer;
    color: #475569;
    transition: all 0.15s;
}
.kb-cat-btn:hover { border-color: #2563eb; color: #2563eb; }
.kb-cat-btn.active { background: #1e3a5f; border-color: #1e3a5f; color: #fff; }

/* Featured banner */
.kb-home-featured {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
    border-radius: 12px;
    margin-bottom: 2rem;
    color: #fff;
}
.kb-home-featured__inner {
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.kb-home-featured__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}
.kb-home-featured__summary {
    font-size: 0.875rem;
    color: #bfdbfe;
    margin: 0;
    line-height: 1.5;
}
.kb-home-featured__btn {
    display: inline-block;
    margin-top: 0.25rem;
    align-self: flex-start;
    background: #fff;
    color: #1e3a5f;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    text-decoration: none;
}
.kb-home-featured__btn:hover { background: #dbeafe; }

.kb-badge-live {
    display: inline-block;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    text-transform: uppercase;
}
.kb-badge-live--sm {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    font-size: 0.65rem;
}

.kb-home-count {
    font-size: 0.8rem;
    color: #94a3b8;
    text-align: right;
    margin-bottom: 0.75rem;
    min-height: 1em;
}

/* Grid */
.kb-home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* Card */
.kb-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s, transform 0.1s;
}
.kb-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1); transform: translateY(-2px); }
.kb-card__bar {
    height: 80px;
    position: relative;
    flex-shrink: 0;
}
.kb-card__body {
    padding: 0.9rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.kb-card__cat {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #2563eb;
    margin-bottom: 0.25rem;
}
.kb-card__title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin: 0 0 0.4rem;
}
.kb-card__title a { text-decoration: none; color: inherit; }
.kb-card__title a:hover { color: #2563eb; }
.kb-card__summary {
    font-size: 0.8125rem;
    color: #475569;
    line-height: 1.55;
    margin: 0 0 0.5rem;
    flex: 1;
}
.kb-card__foot {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.72rem;
    color: #94a3b8;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.5rem;
    margin-bottom: 0.6rem;
}
.kb-card__link {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    align-self: flex-start;
}
.kb-card__link:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .kb-home-wrap { padding-top: 70px; }
    .kb-home-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .kb-card__bar { height: 60px; }
}
@media (max-width: 400px) {
    .kb-home-grid { grid-template-columns: 1fr; }
}

a.wiki-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
