/* WIKI TOPIC - SIMPLIFIED */

:root {
    --primary: #2563eb;
    --primary-hover: #1e40af;
    --border: #e5e7eb;
    --bg: #f9fafb;
    --surface: #ffffff;
    --text: #111827;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
}

body {
    margin: 0px !important;
}

/* HERO */
.wiki-hero {
    background: linear-gradient(135deg, #1e2f77 0%, #1870ac 100%);
    color: white;
    padding: 48px 24px;
    text-align: center;
}

.wiki-hero-content {
    max-width: 1200px;
    margin: 0 auto;
}

.wiki-breadcrumb {
    font-size: 14px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.wiki-breadcrumb a {
    color: white;
    text-decoration: none;
}

.wiki-breadcrumb a:hover {
    text-decoration: underline;
}

.wiki-hero-title {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.wiki-hero-meta {
    font-size: 14px;
    margin-bottom: 24px;
    opacity: 0.95;
}

.wiki-hero-meta span {
    margin: 0 8px;
}

.wiki-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* BUTTONS */
.btn-primary {
    padding: 12px 24px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-small {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

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

.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-hover);
}

/* LAYOUT */
.wiki-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

.wiki-main {
    min-width: 0;
}

/* ARTICLE */
.wiki-article {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
}

.wiki-section {
    margin-bottom: 40px;
}

.wiki-section:last-child {
    margin-bottom: 0;
}

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

.wiki-text p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 16px;
}

.wiki-text p:last-child {
    margin-bottom: 0;
}

/* CONTRIBUTORS */
.contributors-section {
    border-top: 2px solid var(--border);
    padding-top: 32px;
    margin-top: 48px;
}

.contributors-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text);
}

.contributors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.contributor-card {
    text-align: center;
    padding: 16px;
    background: var(--bg);
    border-radius: 8px;
}

.contributor-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 700;
}

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

.contributor-role {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.contributor-contributions {
    font-size: 12px;
    color: var(--text-lighter);
}

/* DISCUSSION */
.discussion-section {
    border-top: 2px solid var(--border);
    padding-top: 32px;
    margin-top: 48px;
}

.discussion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.discussion-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.thread {
    background: var(--bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

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

.thread-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.thread-info {
    flex: 1;
}

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

.thread-time {
    font-size: 12px;
    color: var(--text-lighter);
}

.thread-content {
    margin-bottom: 12px;
}

.thread-content p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
}

.thread-actions {
    display: flex;
    gap: 12px;
}

.thread-action {
    padding: 6px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-light);
    cursor: pointer;
}

.thread-action:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.replies {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.reply {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.reply:last-child {
    margin-bottom: 0;
}

.reply-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.reply-content {
    flex: 1;
}

.reply-header {
    margin-bottom: 6px;
}

.reply-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-right: 8px;
}

.reply-time {
    font-size: 12px;
    color: var(--text-lighter);
}

.reply-content p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-light);
}

/* SIDEBAR */
.wiki-sidebar {
    position: sticky;
    top: 24px;
    height: fit-content;
}

.sidebar-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-section h4 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.perspective-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.perspective-item {
    padding: 12px;
    background: var(--bg);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    display: block;
}

.perspective-item:hover {
    background: #e0e7ff;
}

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

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

.stat-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.stat-row span {
    color: var(--text-light);
}

.stat-row strong {
    color: var(--text);
    font-weight: 600;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related-link {
    padding: 10px;
    background: var(--bg);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
    display: block;
}

.related-link:hover {
    background: #e0e7ff;
    color: var(--primary);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .wiki-hero {
        padding: 32px 20px;
    }

    .wiki-hero-title {
        font-size: 28px;
    }

    .wiki-actions {
        flex-direction: column;
    }

    .wiki-actions button {
        width: 100%;
    }

    .wiki-container {
        grid-template-columns: 1fr;
        padding: 24px 16px;
    }

    .wiki-article {
        padding: 24px;
    }

    .contributors-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wiki-sidebar {
        position: static;
    }
}

/* Admin Controls */
.wiki-admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.private-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Edit Mode */
.edit-mode-toolbar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.toolbar-group {
    display: flex;
    gap: 4px;
    padding: 0 12px;
    border-right: 1px solid var(--border);
}

.toolbar-group:last-child {
    border-right: none;
    margin-left: auto;
}

.toolbar-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

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

/* Version Banner */
.version-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.version-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.version-banner-content svg {
    color: #d97706;
    flex-shrink: 0;
}

.version-banner-content strong {
    display: block;
    font-size: 14px;
    color: #78350f;
    margin-bottom: 2px;
}

.version-banner-content span {
    display: block;
    font-size: 12px;
    color: #92400e;
}

.version-banner-actions {
    display: flex;
    gap: 8px;
}

.btn-secondary-small {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid #d97706;
    color: #78350f;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

/* Change Log */
.section-header-with-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.change-log {
    background: var(--bg);
    border-radius: 8px;
    padding: 16px;
}

.change-item {
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 12px;
}

.change-item:last-child {
    margin-bottom: 0;
}

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

.change-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.change-info {
    flex: 1;
}

.change-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.change-time {
    font-size: 11px;
    color: var(--text-lighter);
}

.change-summary {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.change-stats {
    display: flex;
    gap: 12px;
    font-size: 11px;
}

.change-stat {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.change-stat.added {
    background: #d1fae5;
    color: #065f46;
}

.change-stat.removed {
    background: #fee2e2;
    color: #991b1b;
}

.change-stat.citation {
    background: #dbeafe;
    color: #1e40af;
}

/* Contributor Admin Actions */
.section-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.contributor-admin-actions {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.btn-tiny {
    padding: 4px 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    color: var(--text-light);
}

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

/* Thread Admin Actions */
.thread-admin-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.btn-link-small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}


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

.btn-link-small.danger:hover {
    color: #dc2626;
}

.content-controls {
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 10;
    padding: 8px 0;
}

/* Version Selector */
.version-selector {
    margin-bottom: 16px;
}

.version-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--bg);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.version-item.current {
    background: #dbeafe;
    border: 1px solid var(--primary);
}

.version-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    flex-shrink: 0;
}

.version-info {
    flex: 1;
}

.version-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.version-meta {
    font-size: 11px;
    color: var(--text-light);
}

.subsection-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-lighter);
    margin: 16px 0 12px 0;
}

/* Perspective Items */
.perspective-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.perspective-badge {
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.perspective-divergence {
    margin-top: 8px;
}

.divergence-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.divergence-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s;
}

.divergence-label {
    font-size: 10px;
    color: var(--text-lighter);
}

.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);
}

/* Admin Section */
.admin-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
}

.admin-control-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-control-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    transition: all 0.2s;
    text-align: left;
}

.admin-control-btn:hover {
    background: var(--bg);
    border-color: var(--primary);
}

.admin-control-btn.danger:hover {
    border-color: #dc2626;
    color: #dc2626;
}

/* Modal Styles */
.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;
}

.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: 18px;
    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: flex-end;
    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);
}

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

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

.setting-label {
    display: block;
    margin-bottom: 8px;
}

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

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

.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    background: var(--surface);
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-select-small {
    padding: 6px 8px;
    font-size: 12px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

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

.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);
}

.toggle-text {
    font-size: 14px;
    color: var(--text);
}

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

.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;
}

/* Contributor Management */
.contributor-invite {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    margin-bottom: 20px;
}

.form-input {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.contributor-list-full {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contributor-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: 8px;
}

.contributor-list-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.contributor-list-info {
    flex: 1;
}

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

.contributor-list-email {
    font-size: 12px;
    color: var(--text-light);
}

.contributor-list-role {
    margin-right: 8px;
}

/* Version Comparison */
.version-compare-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg);
    border-radius: 8px;
}

.version-select-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.version-select-group label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
}

.diff-view {
    background: var(--bg);
    border-radius: 8px;
    padding: 20px;
}

.diff-section {
    margin-bottom: 24px;
}

.diff-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.diff-content {
    background: var(--surface);
    border-radius: 6px;
    padding: 16px;
}

.diff-line {
    margin: 0 0 8px 0;
    padding: 8px;
    border-radius: 4px;
    line-height: 1.6;
}

.diff-line.added {
    background: #d1fae5;
    color: #065f46;
}

.diff-line.removed {
    background: #fee2e2;
    color: #991b1b;
    text-decoration: line-through;
}

.diff-stats {
    background: var(--surface);
    border-radius: 8px;
    padding: 16px;
}

.diff-stat {
    margin-bottom: 16px;
}

.diff-stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    display: block;
    margin-bottom: 8px;
}

.diff-stat-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.diff-stat-fill {
    height: 100%;
    transition: width 0.3s;
}

.diff-stat-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.diff-stat-summary {
    display: flex;
    gap: 16px;
    font-size: 13px;
}

.diff-added {
    color: #065f46;
    font-weight: 600;
}

.diff-removed {
    color: #991b1b;
    font-weight: 600;
}

.diff-changed {
    color: var(--text-light);
}

.btn-success {
    background: #10b981;
    color: white;
    border: none;
}

.btn-success:hover {
    background: #059669;
}

/* Discussion Controls */
.discussion-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.discussion-sort {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    background: var(--surface);
    cursor: pointer;
}

/* Legislation Reference */
.legislation-reference {
    padding: 14px;
    background: var(--bg);
    border-left: 3px solid var(--primary);
    border-radius: 0 6px 6px 0;
}

.legislation-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
}

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

.legislation-meta {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.legislation-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-light);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
}

.status-indicator.active {
    background: #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Modal Sizing */
.modal.modal-large {
    max-width: 720px;
}

/* 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;
}

/* Version Steps */
.version-step {
    display: none;
}

.version-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;
}

/* Info Box */
.info-box {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    margin-top: 20px;
}

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

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

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

/* Starting Point Selector */
.starting-point-selector {
    margin-bottom: 32px;
}

.starting-point-selector h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.selector-description {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 16px;
}

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

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

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

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

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

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

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

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

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

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

.option-description {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

/* Section Checkboxes */
.sections-to-focus {
    margin-bottom: 32px;
}

.sections-to-focus h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.section-checkboxes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.section-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    color: var(--text);
}

.section-checkbox:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.section-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Quick Edit Area */
.initial-changes-preview {
    margin-bottom: 24px;
}

.initial-changes-preview h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-edit-area {
    margin-top: 16px;
}

.quick-edit-helper {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 8px;
}

/* Privacy Options */
.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);
}

/* 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;
}

/* Responsive */
@media (max-width: 768px) {
    .step-indicator {
        padding: 0 12px 20px;
    }
    
    .step-label {
        font-size: 10px;
    }
    
    .step-connector {
        width: 40px;
    }
    
    .section-checkboxes {
        grid-template-columns: 1fr;
    }
    
    .modal.modal-large {
        max-width: 100%;
    }
}



/* Single Expandable Article */
.wiki-collapsible-content {
    position: relative;
    transition: max-height 0.5s ease-out;
}

.wiki-collapsible-content.collapsed {
    max-height: 600px;
    overflow: hidden;
}

.wiki-collapsible-content.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, transparent, var(--surface));
    pointer-events: none;
}

.wiki-collapsible-content.expanded {
    max-height: none;
}

.wiki-collapsible-content.expanded::after {
    display: none;
}

.read-more-article {
    display: flex;
    justify-content: center;
    padding: 32px 0;
    margin: 24px 0;
}

.read-more-article-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.read-more-article-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.read-more-article-btn svg {
    transition: transform 0.2s;
}

.read-more-article-btn.expanded svg {
    transform: rotate(180deg);
}