/* Override default top_banner wrapper for feature-info card */
.top_banner {
    background-color: transparent;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
}

/* Feature info banner */
.feature-info-banner {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 50%, #f5f3ff 100%);
    border-radius: 12px;
    padding: 28px 32px;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.feature-info-title {
    margin: 0 0 16px 0;
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.feature-info-text {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.7;
    color: #475569;
}

.feature-info-text--last {
    margin-bottom: 20px;
}

.feature-info-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: #3b82f6;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.3);
}

.feature-info-cta:hover {
    background: #2563eb;
    color: #fff;
    text-decoration: none;
}

#chart-container {
    width: 100%;
    max-width: 1000px;
    height: 500px;
    margin: auto;
}

canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    color: #2c3e50;
    line-height: 1.6;
    padding: 20px;
}

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

.container h1 {
    margin-bottom: 30px;
    color: #1a1a1a;
    font-weight: 600;
}

/* Promise Item Container */
.promise-item {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Promise Item Header (clickable row) */
.promise-item-header {
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
}

.promise-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Left Section - Status Indicator */
.promise-item-left {
    flex-shrink: 0;
    width: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Base status-indicator: cosmetic only. Sizing handled by Phase 4+7 block below. */
.status-indicator {
    font-weight: 700;
    color: #2c3e50;
    transition: transform 0.2s ease;
}

.promise-item:hover .status-indicator {
    transform: scale(1.05);
}

/* Status Colors */
.status-default {
    background-color: #f0f0f0;
    color: #666;
}

.status-complete {
    background-color: #10b981;
    color: #ffffff;
}

.status-partly-complete {
    background-color: #06b6d4;
    color: #ffffff;
}

.status-in-progress {
    background-color: #3b82f6;
    color: #ffffff;
}

.status-problematic {
    background-color: #f59e0b;
    color: #ffffff;
}

.status-failed {
    background-color: #ef4444;
    color: #ffffff;
}

.status-disputed {
    background-color: #8b5cf6;
    color: #ffffff;
}

/* Disputed diagonal stripes overlay - combines original status color with purple stripes */
.status-indicator.disputed {
    position: relative;
}

.status-indicator.disputed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 8px,
            rgba(139, 92, 246, 0.6) 8px,
            rgba(139, 92, 246, 0.6) 16px);
    pointer-events: none;
}

.promise-number {
    font-weight: 700;
    position: relative;
    z-index: 1;
}

/* Middle Section - Promise Text */
.promise-item-middle {
    flex: 1;
    min-width: 0;
    padding-right: 20px;
}

.promise-text {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.promise-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.4;
}

.promise-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hashtag {
    display: inline-block;
    padding: 4px 12px;
    background-color: #f0f4f8;
    color: #4a5568;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.hashtag:hover {
    background-color: #e2e8f0;
    cursor: pointer;
}

/* Right Section - Meta Information */
.promise-item-right {
    flex-shrink: 0;
    width: 80px;
    display: flex;
    justify-content: flex-end;
}

.promise-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 14px;
}

.icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    flex-shrink: 0;
}

.meta-count {
    font-weight: 600;
    min-width: 24px;
    text-align: right;
}

/* Responsive Design */
@media (max-width: 768px) {
    .promise-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .promise-item-left {
        width: 100%;
        justify-content: flex-start;
    }

    /* .status-indicator sizing moved to Phase 4+7 responsive block */

    .promise-item-middle {
        width: 100%;
        padding-right: 0;
    }

    .promise-item-right {
        width: 100%;
        justify-content: flex-start;
    }

    .promise-meta {
        flex-direction: row;
        gap: 20px;
        align-items: center;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .promise-item {
        padding: 16px;
    }

    .promise-title {
        font-size: 16px;
    }

    .hashtag {
        font-size: 12px;
        padding: 3px 10px;
    }
}

/* Promise Item Wrapper */
.promise-item-wrapper {
    margin-bottom: 16px;
}

/* Active State */
.promise-item.active {
    border-left: 4px solid #3b82f6;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

/* Muted styling for duplicate promises */
.promise-item-wrapper.is-duplicate {
    opacity: 0.8;
}

.promise-item-wrapper.is-duplicate .promise-item {
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    box-shadow: none;
}

.promise-item-wrapper.is-duplicate .promise-title {
    color: #64748b;
}

.promise-item-wrapper.is-duplicate:hover {
    opacity: 1;
}

.promise-item-wrapper.is-duplicate .promise-item:hover {
    border-style: solid;
    border-color: #94a3b8;
}

/* Promise Details Panel */
.promise-details {
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
    margin-top: -8px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-top: none;
}

.promise-details-content {
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

/* Remove cursor from promise-item, it's on header now */

/* Promise Source Details (inside promise-item, hidden by default) */
.promise-source-details {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.promise-item.active .promise-source-details {
    display: block;
}

.source-header {
    font-size: 14px;
    margin-bottom: 8px;
}

.source-label {
    font-weight: 500;
    color: #475569;
    margin-right: 6px;
}

.source-link {
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
}

.source-link:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.source-page {
    color: #1e40af;
    font-weight: 500;
    margin-left: 6px;
}

.source-date {
    color: #94a3b8;
    margin-left: 6px;
}

.source-description {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    font-style: italic;
    padding-left: 12px;
    border-left: 3px solid #3b82f6;
    margin: 8px 0 0 0;
}

/* Promise Articles Panel (separate from promise-item) */
.promise-articles-panel {
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-top: none;
    margin-top: -8px;
}

.articles-header {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 12px;
}

/* Articles List */
.articles-list {
    margin-bottom: 20px;
}

.article-item {
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.article-item:last-child {
    border-bottom: none;
}

.article-highlight {
    font-style: italic;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 6px;
    padding-left: 12px;
    border-left: 3px solid #3b82f6;
}

.article-title {
    display: block;
    color: #1e40af;
    font-weight: 500;
    text-decoration: none;
    font-size: 15px;
    margin-bottom: 4px;
    transition: color 0.2s ease;
}

.article-title:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.article-meta {
    font-size: 12px;
    color: #94a3b8;
}

.article-date {
    margin-right: 12px;
}

.article-source {
    font-weight: 500;
}

.no-articles {
    color: #94a3b8;
    font-style: italic;
    padding: 12px 0;
}

/* Submit Article Form */
.submit-article-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    width: 100%;
}

.submit-label {
    font-weight: 500;
    font-size: 14px;
    color: #475569;
}

.submit-url-input {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.submit-url-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.submit-btn {
    padding: 8px 16px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.submit-btn:hover {
    background-color: #2563eb;
}

/* Shareable Link */
.shareable-link {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed #cbd5e1;
    font-size: 13px;
}

.share-label {
    color: #64748b;
    margin-right: 8px;
}

.share-url {
    color: #3b82f6;
    word-break: break-all;
}

.share-url:hover {
    text-decoration: underline;
}

/* Highlighted Promise (from URL param) */
.promise-item-wrapper.highlighted {
    scroll-margin-top: 20px;
}

.promise-item-wrapper.highlighted .promise-item {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(to right, rgba(245, 158, 11, 0.05), transparent);
}

/* Admin Commentary Styles */
.admin-commentary {
    margin-top: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    border-left: 4px solid #f59e0b;
    border-radius: 0 12px 12px 0;
}

.commentary-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.commentary-icon {
    font-size: 18px;
}

.commentary-label {
    font-weight: 600;
    color: #92400e;
    font-size: 15px;
}

.commentary-date {
    font-size: 13px;
    color: #a16207;
}

.commentary-text {
    font-size: 16px;
    line-height: 1.6;
    color: #78350f;
    margin: 0;
}

/* Disputes Section - 2 Column Layout */
.disputes-section {
    margin-top: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-left: 4px solid #8b5cf6;
    border-radius: 0 12px 12px 0;
}

.disputes-header {
    font-size: 17px;
    font-weight: 600;
    color: #5b21b6;
    margin: 0 0 16px 0;
}

.disputes-columns {
    display: flex;
    gap: 20px;
}

.disputes-column {
    flex: 1;
    min-width: 0;
}

.disputes-column-header {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid;
}

.disputes-pro .disputes-column-header {
    color: #059669;
    border-color: #10b981;
}

.disputes-con .disputes-column-header {
    color: #dc2626;
    border-color: #ef4444;
}

.dispute-item {
    padding: 12px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dispute-quote {
    font-style: italic;
    color: #4b5563;
    font-size: 14px;
    margin: 0 0 8px 0;
    padding-left: 12px;
    border-left: 3px solid #8b5cf6;
}

.dispute-article-link {
    display: block;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.dispute-article-link:hover {
    text-decoration: underline;
}

.dispute-meta {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
}

.no-disputes {
    color: #9ca3af;
    font-style: italic;
    font-size: 14px;
    margin: 0;
}

/* Dispute Icon in Promise Meta */
.meta-disputed {
    color: #8b5cf6;
}

.icon-disputed {
    stroke: #8b5cf6;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .promise-item {
        padding: 12px;
    }

    .promise-item-header {
        gap: 12px;
    }

    .promise-item-left {
        width: 50px;
    }

    /* .status-indicator sizing moved to Phase 4+7 responsive block */

    .promise-title {
        font-size: 14px;
        line-height: 1.3;
    }

    .promise-hashtags {
        margin-top: 4px;
    }

    .hashtag {
        font-size: 11px;
        padding: 2px 6px;
    }

    .promise-item-right {
        display: none;
        /* Hide article count on mobile to save space */
    }

    .promise-source-details {
        padding: 12px;
        margin-top: 12px;
    }

    .source-header {
        font-size: 13px;
    }

    .source-description {
        font-size: 12px;
    }

    .promise-articles-panel {
        padding: 12px;
    }

    .article-title {
        font-size: 14px;
    }

    /* Disputes mobile - stack columns */
    .disputes-columns {
        flex-direction: column;
        gap: 16px;
    }

    .disputes-section {
        padding: 12px 16px;
    }

    .disputes-header {
        font-size: 15px;
    }
}

/* Article Submit Form - Updated Layout */
.submit-article-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.submit-url-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.submit-url-row .submit-url-input {
    flex: 1;
}

.submit-btn:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
}

/* Article Preview Card */
.article-preview {
    margin-top: 12px;
}

.preview-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
    border-radius: 12px;
    padding: 20px;
}

.preview-title {
    font-size: 16px;
    font-weight: 600;
    color: #166534;
    margin: 0 0 16px 0;
}

.preview-field {
    margin-bottom: 12px;
}

.preview-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.preview-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.preview-input[readonly] {
    background-color: #f1f5f9;
    color: #64748b;
}

.preview-image {
    margin-top: 12px;
}

.preview-thumbnail {
    max-width: 200px;
    max-height: 120px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    object-fit: cover;
}

.preview-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #86efac;
}

.preview-confirm-btn {
    padding: 10px 24px;
    background-color: #22c55e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.preview-confirm-btn:hover {
    background-color: #16a34a;
}

.preview-cancel-btn {
    padding: 10px 24px;
    background-color: white;
    color: #64748b;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-cancel-btn:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
}

/* Error Message */
.submit-error {
    margin-top: 12px;
}

.error-message {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 12px 16px;
    color: #b91c1c;
    font-size: 14px;
    margin: 0;
}

/* Mobile responsive for preview */
@media (max-width: 768px) {
    .submit-url-row {
        flex-direction: column;
        align-items: stretch;
    }

    .preview-card {
        padding: 16px;
    }

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

    .preview-confirm-btn,
    .preview-cancel-btn {
        width: 100%;
        text-align: center;
    }

    .preview-layout {
        flex-direction: column;
    }

    .preview-image-col {
        width: 100%;
        margin-bottom: 12px;
    }

    .preview-thumbnail {
        max-width: 100%;
        height: auto;
    }

    .preview-meta-row {
        flex-direction: column;
    }
}

/* Compact Preview Layout */
.preview-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.preview-image-col {
    flex-shrink: 0;
    width: 100px;
}

.preview-thumbnail {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.preview-no-image {
    width: 100px;
    height: 75px;
    background: #f1f5f9;
    border-radius: 6px;
    border: 1px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #94a3b8;
}

.preview-fields-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.preview-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    white-space: nowrap;
    min-width: 50px;
}

.preview-title-input {
    flex: 1;
    font-weight: 600;
    font-size: 15px;
}

.preview-date {
    width: 100px;
}

.preview-source {
    flex: 1;
}

.preview-url-full {
    flex: 1;
    color: #64748b;
    font-size: 12px;
    background-color: #f8fafc !important;
}

.preview-input {
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13px;
    background: white;
}

.preview-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.1);
}

.preview-warning {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 8px 12px;
    color: #92400e;
    font-size: 13px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}

.spinner-large {
    width: 24px;
    height: 24px;
    border-width: 3px;
    border-color: rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background: #f8fafc;
    border-radius: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* reCAPTCHA Styling */
.recaptcha-container {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

/* Success Message Styling */
.submit-success {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
    border-radius: 8px;
    color: #166534;
}

.success-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.submit-success p {
    margin: 0;
    font-weight: 600;
}

/* ======================================
   Refined Article Preview Layout
   ====================================== */

/* Full-width rows */
.preview-row-full {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.preview-row-full .preview-label {
    flex-shrink: 0;
    min-width: 60px;
}

.preview-row-full .preview-input {
    flex: 1;
}

/* Grid layout: image left, fields right */
.preview-layout-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 16px;
    margin-bottom: 12px;
}

.preview-layout-grid .preview-image-col {
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-layout-grid .preview-thumbnail {
    width: 120px;
    height: auto;
    max-height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.preview-layout-grid .preview-no-image {
    width: 120px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 32px;
}

/* Side-by-side dropdowns row */
.preview-row-dropdowns {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr;
    gap: 8px;
    align-items: center;
}

.preview-row-dropdowns .preview-label {
    white-space: nowrap;
}

.preview-row-dropdowns .preview-input {
    min-width: 120px;
}

/* Highlighted sentence container */
.preview-highlight-input-container {
    display: none;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.preview-highlight-input-container .preview-label {
    flex-shrink: 0;
    white-space: nowrap;
}

.preview-highlight-input-container .preview-input {
    flex: 1;
}

/* Info text styling */
.preview-info-text {
    font-size: 14px;
    color: #475569;
    font-style: italic;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-left: 4px solid #f59e0b;
    border-radius: 0 8px 8px 0;
    margin: 12px 0;
}

/* Actions row with captcha */
.preview-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.preview-actions-row .recaptcha-container {
    margin: 0;
}

.preview-actions-row .preview-actions {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: none;
}

/* Mobile responsive for new layout */
@media (max-width: 768px) {
    .preview-layout-grid {
        grid-template-columns: 1fr;
    }

    .preview-layout-grid .preview-image-col {
        display: none;
    }

    .preview-row-dropdowns {
        grid-template-columns: auto 1fr;
        gap: 8px;
    }

    .preview-actions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .preview-actions-row .recaptcha-container {
        display: flex;
        justify-content: center;
    }

    .preview-actions-row .preview-actions {
        justify-content: center;
    }
}

/* =============================================================================
   Politician Card (Namecard Style) - 350px left / fluid right
   ============================================================================= */

.politician-card {
    display: flex;
    gap: 28px;
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    min-height: 320px;
}

.politician-card-left {
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
}

.politician-photo-container {
    width: 280px;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    margin-bottom: 14px;
    flex-shrink: 0;
}

.politician-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.politician-info {
    display: flex;
    flex-direction: column;
}

.politician-card-left .politician-name {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

/* Mobile-only elements - hidden on desktop */
.politician-current-term-mobile,
.status-bar-mobile,
.mobile-details-toggle {
    display: none;
}

.politician-terms {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Terms Group */
.terms-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.terms-group-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 2px;
}

.current-terms-group .terms-group-label {
    color: #059669;
}

.past-terms-group .terms-group-label {
    color: #94a3b8;
}

/* Term Block (compact) */
.term-block {
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}

.term-block:last-child {
    border-bottom: none;
}

.term-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 8px;
}

.term-role {
    font-weight: 700;
    font-size: 15px;
    color: #1e293b;
}

.term-sub-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    align-items: center;
}

.term-meta {
    margin-bottom: 12px;
}

.term-stats-text {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 4px;
}

.term-source {
    font-size: 13px;
}

.term-years {
    font-size: 13px;
    color: #64748b;
}

.term-source-link {
    color: #3b82f6;
    text-decoration: none;
}

.term-source-link:hover {
    text-decoration: underline;
}

.current-term {
    background: linear-gradient(to right, rgba(5, 150, 105, 0.05), transparent);
    margin: 0 -8px;
    padding: 6px 8px;
    border-radius: 6px;
    border-bottom: none;
}

/* Right Side - Chart (fills available height) */
.politician-card-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.status-bar-mobile {
    display: flex;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    background-color: #e2e8f0;
    /* The 'track' background */
    width: 100%;
}

.status-bar-segment {
    height: 100%;
    transition: width 0.3s ease;
}

.chart-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
    flex-shrink: 0;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.chart-toggle {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 3px;
}

.toggle-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-btn:hover {
    color: #1e293b;
}

.toggle-btn.active {
    background: #ffffff;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chart-container {
    flex: 1;
    min-height: 0;
}

/* Term Progress Bar - seek bar style */
.term-progress-bar {
    height: 20px;
    padding: 6px 0;
    margin-top: 4px;
}

.progress-track {
    position: relative;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(to right, #ef4444, #dc2626);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #dc2626;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease;
}

/* Status bar segment colors for mobile */
.status-bar-segment.successful {
    background-color: #10b981;
}

.status-bar-segment.partly-successful {
    background-color: #06b6d4;
}

.status-bar-segment.in-progress {
    background-color: #3b82f6;
}

.status-bar-segment.problematic {
    background-color: #f59e0b;
}

.status-bar-segment.failed {
    background-color: #ef4444;
}

.status-bar-segment.disputed {
    background-color: #8b5cf6;
}

.term-status-bar-mobile {
    margin: 12px 0 6px 0;
}

.term-mobile-stats-row {
    display: none;
    justify-content: space-between;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Hidden utility class */
.term-progress-bar.hidden {
    display: none;
}

/* Progress text */
.progress-text {
    font-size: 12px;
    color: #64748b;
    text-align: center;
    margin-top: 4px;
}

/* =============================================================================
   Mobile Responsive - Simplified View
   ============================================================================= */
@media (max-width: 900px) {
    .politician-card {
        flex-direction: column;
        padding: 16px;
        gap: 16px;
        min-height: auto;
    }

    .politician-card-left {
        flex: 1;
        flex-direction: column;
        gap: 16px;
        align-items: center;
        width: 100%;
    }

    .politician-photo-container {
        width: 140px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .politician-info {
        width: 100%;
        text-align: center;
    }

    .politician-card-left .politician-name {
        font-size: 20px;
        margin-bottom: 8px;
    }

    /* Show mobile-only elements */
    .politician-current-term-mobile {
        display: block;
        font-size: 14px;
        color: #64748b;
        margin-bottom: 12px;
    }

    .status-bar-mobile {
        margin-bottom: 12px;
        max-width: 100%;
    }

    .term-block {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 20px;
    }

    .term-block:last-child {
        margin-bottom: 0;
    }

    .terms-group {
        margin-bottom: 24px;
    }

    .terms-group-label {
        display: block;
        margin-bottom: 12px;
        font-size: 13px;
        color: #475569;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 4px;
    }

    .mobile-details-toggle {
        display: block;
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
        font-weight: 600;
        color: #3b82f6;
        background: #f1f5f9;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .mobile-details-toggle:hover {
        background: #e2e8f0;
    }

    /* Hide desktop-only on mobile, but NOT the terms if they should be visible */
    .desktop-only:not(.politician-terms) {
        display: none !important;
    }

    .politician-terms {
        display: none;
        /* Controlled by .expanded class */
        width: 100%;
        text-align: left;
    }

    /* Expandable details on mobile */
    .politician-terms.expanded {
        display: flex !important;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 2px solid #f1f5f9;
    }

    .terms-group {
        width: 100%;
    }

    .term-mobile-stats-row {
        display: flex;
    }
}

/* Admin Commentary Form */
.admin-commentary-form {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #e2e8f0;
}

.commentary-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.commentary-form-row {
    display: flex;
    gap: 10px;
}

.commentary-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.commentary-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.commentary-status-select {
    width: 160px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
}

.commentary-submit-btn {
    padding: 8px 20px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 60px;
}

.commentary-submit-btn:hover {
    background-color: #2563eb;
}

.commentary-submit-btn:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
}

.commentary-form-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 5px;
}

/* Filter Toolbar & Toggle */
.toolbar-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.admin-toolbar {
    margin-bottom: 16px;
}

.filter-toolbar-container {
    flex: 0 1 auto;
}

.new-promise-wrapper {
    flex: 0 0 auto;
    margin-bottom: 0 !important;
}

.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.filter-toggle-btn:hover {
    background: #f8fafc;
    color: #1e293b;
    border-color: #cbd5e1;
}

.filter-toggle-btn .toggle-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.filter-toggle-btn .toggle-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.filter-reset-btn {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: none;
    /* Toggled by JS */
}

.filter-reset-btn:hover {
    background: #fee2e2;
}

.filter-toggle-btn.active {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #cbd5e1;
}

.filter-toggle-btn.active .toggle-icon {
    transform: rotate(180deg);
}

.shared-expansion-panel {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0px;
}

.shared-expansion-panel.is-open {
    max-height: 2000px;
    opacity: 1;
    visibility: visible;
    margin-bottom: 24px;
}

.filter-panel-content,
.new-promise-form-container {
    padding-top: 4px;
}

.filter-toolbar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    width: 100%;
}

.filter-row {
    display: flex;
    gap: 32px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-separator {
    height: 1px;
    background: #e2e8f0;
    margin: 20px 0;
    width: 100%;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-group-full {
    width: 100%;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    color: #334155;
    background-color: white;
    min-width: 200px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.filter-select:focus {
    border-color: #3b82f6;
}

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

.status-filter-btn {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-filter-btn:hover {
    background: #f1f5f9;
    color: #334155;
}

.status-filter-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}


.status-filter-btn[data-value="complete"].active {
    background: #10b981;
    border-color: #10b981;
}

.status-filter-btn[data-value="partly-complete"].active {
    background: #06b6d4;
    border-color: #06b6d4;
}

.status-filter-btn[data-value="in-progress"].active {
    background: #3b82f6;
    border-color: #3b82f6;
}

.status-filter-btn[data-value="problematic"].active {
    background: #f59e0b;
    border-color: #f59e0b;
}

.status-filter-btn[data-value="failed"].active {
    background: #ef4444;
    border-color: #ef4444;
}

.status-filter-btn[data-value="disputed"].active {
    background: #8b5cf6;
    border-color: #8b5cf6;
}

@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        gap: 16px;
    }

    .filter-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .filter-select {
        width: 100%;
    }

    .status-filters {
        gap: 6px;
    }

    .status-filter-btn {
        flex: 1;
        text-align: center;
        font-size: 12px;
        padding: 6px 8px;
    }
}

/* Stale duplicated filter styles removed - consolidated above */

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-group-full {
    width: 100%;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

.filter-btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Generic Filter Button (Sort & Term) */
.filter-btn {
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    background: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: #f1f5f9;
    color: #334155;
}

.filter-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* Status Filter Buttons */
.status-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.status-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-filter-btn:hover {
    background: #f1f5f9;
    color: #334155;
}

.status-filter-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* Count Badge */
.count-badge {
    display: inline-block;
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.status-filter-btn.active .count-badge {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* Status specific active colors */
.status-filter-btn[data-value="complete"].active {
    background: #10b981;
    border-color: #10b981;
}

.status-filter-btn[data-value="partly-complete"].active {
    background: #06b6d4;
    border-color: #06b6d4;
}

.status-filter-btn[data-value="in-progress"].active {
    background: #3b82f6;
    border-color: #3b82f6;
}

.status-filter-btn[data-value="problematic"].active {
    background: #f59e0b;
    border-color: #f59e0b;
}

.status-filter-btn[data-value="failed"].active {
    background: #ef4444;
    border-color: #ef4444;
}

.status-filter-btn[data-value="disputed"].active {
    background: #8b5cf6;
    border-color: #8b5cf6;
}

@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        gap: 16px;
    }

    .filter-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .filter-btn-group,
    .status-filters {
        gap: 6px;
    }

    .filter-btn,
    .status-filter-btn {
        flex: 1;
        text-align: center;
        justify-content: center;
        font-size: 12px;
        padding: 6px 8px;
    }
}

/* Hashtag Filters */
.hashtag-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hashtag-filter-btn {
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #64748b;
}

.hashtag-filter-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.hashtag-filter-btn.active {
    background: #475569;
    border-color: #475569;
    color: white;
}

.hashtag-filter-btn .count-badge {
    background: rgba(0, 0, 0, 0.08);
    margin-left: 4px;
}

.hashtag-filter-btn.active .count-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* New Promise Badge */
.status-indicator .badge-new {
    background: #FFC107;
    color: #4a3e12;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    display: inline-block;
}

/* Debug Mode */
.debug-id {
    display: none;
    color: #ef4444;
    font-size: 0.85em;
    font-family: monospace;
    margin-left: 5px;
    background: rgba(255, 230, 230, 0.5);
    padding: 0 4px;
    border-radius: 4px;
}

body.debug-mode .debug-id {
    display: inline;
}

.toggle-debug-btn.active {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}


/* Processed submission fade */
.pending-submission-item.submission-processed {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* ---------------------------------------------------- */
/* NEW PROMISE META LAYOUT (RIGHT SIDE) */
/* ---------------------------------------------------- */

.promise-meta-new {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    text-align: right;
}

.meta-date {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.meta-status {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}

/* Status Text Colors matching indicators */
.status-text-complete {
    color: #10b981;
}

.status-text-partly-complete {
    color: #06b6d4;
}

.status-text-in-progress {
    color: #3b82f6;
}

.status-text-problematic {
    color: #f59e0b;
}

.status-text-failed {
    color: #ef4444;
}

.status-text-default {
    color: #64748b;
}

.meta-disputed-badge {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fdba74;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

/* ---------------------------------------------------- */
/* PHASE 2: COMPACT LAYOUT STYLES - DEPRECATED (SEE PHASE 4) */
/* ---------------------------------------------------- */


.meta-article-count {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    margin-top: 2px;
}

/* ---------------------------------------------------- */
/* UNIFIED CARD LAYOUT OVERRIDES */
/* ---------------------------------------------------- */

/* Reset panel styles to blend into white card */
.promise-item .promise-articles-panel {
    background: transparent;
    border: none;
    border-top: 1px solid #f1f5f9;
    /* Subtle separator */
    margin-top: 16px;
    padding: 16px 0 0 0;
    border-radius: 0;
}

/* Adjust internal list spacing */
.promise-item .articles-list {
    margin-bottom: 0;
}

.promise-item .article-item:last-child {
    border-bottom: none;
}

/* Make header slightly smaller inside the card */
/* Make header slightly smaller inside the card */
.promise-item .articles-header {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-bottom: 10px;
}

/* ---------------------------------------------------- */
/* PHASE 3: GRID LAYOUT & DETAILS */
/* ---------------------------------------------------- */

/* Ensure wrapper handles expansion */
.promise-item-wrapper {
    transition: margin 0.3s ease;
}

/* Header chevron rotation */
.chevron-icon {
    width: 18px;
    height: 18px;
    color: #64748b;
    position: relative;
    z-index: 1;
    transition: transform 0.2s ease;
}

.promise-item.active .chevron-icon {
    transform: rotate(180deg);
}

/* Details Container */
.promise-details {
    display: none;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #e2e8f0;
    animation: fadeIn 0.3s ease;
}

.promise-item.active .promise-details {
    display: block;
}

/* Grid Layout */
.details-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    align-items: start;
}

.details-main,
.details-side {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Section Card Style */
.details-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
}

.details-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    margin-bottom: 12px;
}

/* Source Info Styling */
.promise-source-info .source-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.promise-source-info .source-link {
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.promise-source-info .source-link:hover {
    text-decoration: underline;
}

.promise-source-info .source-date {
    font-size: 13px;
    color: #64748b;
}

.article-source-name {
    display: inline-block;
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

/* Admin Commentary - Toned Down */
.admin-commentary {
    background: #fffbeb;
    /* Light amber background */
    border-color: #fcd34d;
}

.admin-commentary .details-section-title {
    color: #b45309;
}

.commentary-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #78350f;
}

/* Article List in Grid */
.articles-list.details-section {
    padding: 0;
    /* Remove padding for list container */
    background: transparent;
    border: none;
}

.articles-list .details-section-title {
    margin-bottom: 12px;
    padding-left: 4px;
}

/* Submit Form in Side Column */
.submit-article-form.details-section {
    background: #fff;
}

.submit-url-row {
    display: flex;
    gap: 8px;
}

.submit-url-input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
}

.submit-btn {
    white-space: nowrap;
    padding: 8px 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
}

.submit-btn:hover {
    background: #2563eb;
}

/* Share Link */
.shareable-link {
    background: #fff;
}

.share-url {
    display: block;
    font-size: 12px;
    color: #64748b;
    word-break: break-all;
    text-decoration: none;
    background: #f1f5f9;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
}

.share-url:hover {
    color: #3b82f6;
    background: #eef2ff;
}

/* Responsive Grid */
@media (max-width: 900px) {
    .details-grid {
        grid-template-columns: 1fr;
    }

    .details-side {
        order: 2;
        /* Ensure side content comes after main content on mobile */
    }
}

/* ---------------------------------------------------- */
/* PHASE 4+7: HEADER REFINEMENT & COMPACT BADGE */
/* ---------------------------------------------------- */

.promise-item-header {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 16px;
    row-gap: 4px;
    align-items: center;
    cursor: pointer;
    padding: 0;
}

.promise-item-left {
    grid-row: 1 / span 2;
    grid-column: 1;
    width: auto;
    display: flex;
    justify-content: center;
}

.promise-item-middle {
    grid-column: 2;
    grid-row: 1 / span 2;
    padding-right: 0;
    min-width: 0;
}

.promise-item-right {
    grid-column: 3;
    grid-row: 1 / span 2;
    width: auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.promise-text {
    display: grid;
    grid-template-rows: auto auto;
    row-gap: 4px;
}

.promise-title {
    margin: 0;
    line-height: 1.25;
    font-size: 17px;
    color: #1e293b;
    font-weight: 600;
}

.status-indicator {
    width: 80px;
    min-height: 50px;
    height: auto;
    padding: 5px 5px;
    border-radius: 10px;
    display: grid;
    grid-template-rows: auto auto;
    justify-items: center;
    align-content: center;
    gap: 2px;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.status-indicator .promise-number {
    font-size: 20px;
    line-height: 1;
    font-weight: 800;
}

.status-text-small {
    font-size: 9px;
    line-height: 1.1;
    margin-top: 0;
    letter-spacing: 0.6px;
    font-weight: 700;
    text-transform: uppercase;
}

.indicator-dispute {
    position: absolute;
    right: 6px;
    top: 6px;
    font-size: 13px;
    margin: 0;
    line-height: 1;
}

.promise-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.promise-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.promise-meta-inline {
    white-space: nowrap;
    color: #64748b;
    font-size: 13px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 18px;
    /* Match chevron height for better alignment perception */
}

/* Desktop: show meta on right, hide in middle */
.promise-item-middle .promise-meta-inline {
    display: none;
}

.promise-item-right .promise-meta-inline {
    display: flex;
}

/* Responsive adjustments for Phase 4+7 Header */
@media (max-width: 768px) {
    .promise-item-header {
        grid-template-columns: 60px 1fr 28px;
        column-gap: 8px;
    }

    /* Mobile: show meta in middle, hide on right */
    .promise-item-middle .promise-meta-inline {
        display: flex;
    }

    .promise-item-right .promise-meta-inline {
        display: none;
    }

    .promise-item-right {
        min-width: 0;
    }

    .promise-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .promise-meta-inline {
        white-space: normal;
    }

    .status-indicator {
        width: 52px;
        min-height: 42px;
    }

    .status-indicator .promise-number {
        font-size: 16px;
    }

    .status-text-small {
        font-size: 8px;
    }

    .toolbar-actions-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .new-promise-wrapper,
    .filter-toolbar-container {
        width: 100%;
    }

    .submit-btn,
    .filter-toggle-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Permalink Interaction */
.promise-permalink {
    font-size: 0.7em;
    color: #cbd5e1;
    text-decoration: none;
    margin-left: 10px;
    opacity: 0;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.promise-item-header:hover .promise-permalink {
    opacity: 1;
}

.promise-permalink:hover {
    color: #3b82f6 !important;
    transform: scale(1.2);
}