/* =============================================================
   SharedSpace — Pages Design System
   Covers: browse, article, my-articles, saved, write, profile, subscription
   Scoped to .user-dashboard-shell (inherits dashboard tokens)
   ============================================================= */

/* ─── SHARED PAGE SHELL ──────────────────────────────────────── */
.browse-page-shell,
.article-page-shell,
.my-articles-shell-wrap,
.saved-page-shell,
.write-page-shell,
.profile-page-shell,
.sub-page-shell {
    --sidebar-w: 220px;
}

body:has(.browse-page-shell),
body:has(.article-page-shell),
body:has(.my-articles-shell-wrap),
body:has(.saved-page-shell),
body:has(.write-page-shell),
body:has(.profile-page-shell),
body:has(.sub-page-shell) {
    background: var(--navy-950);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
}

.user-dashboard-shell .dashboard-layout main {
    margin-left: var(--sidebar-w, 220px);
    min-height: 100vh;
    background:
        radial-gradient(ellipse 80% 50% at 70% -10%, rgba(99, 102, 241, 0.07), transparent),
        radial-gradient(ellipse 60% 40% at 10% 80%, rgba(139, 92, 246, 0.05), transparent),
        var(--navy-950);
}

/* ═══════════════════════════════════════════════════════════════
   BROWSE PAGE
   ═══════════════════════════════════════════════════════════════ */
.browse-hero-panel {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    background:
        radial-gradient(ellipse 80% 60% at 90% -20%, rgba(99, 102, 241, 0.16), transparent 60%),
        radial-gradient(ellipse 50% 40% at 10% 100%, rgba(245, 166, 35, 0.08), transparent 60%),
        linear-gradient(160deg, rgba(14, 22, 48, 0.96) 0%, rgba(8, 14, 30, 0.98) 100%);
    border: 1px solid var(--border-mid);
    border-radius: var(--r-xl);
    padding: 32px 32px 28px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}
.browse-hero-panel::after {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(245, 166, 35, 0.4),
        rgba(99, 102, 241, 0.4),
        transparent
    );
}

.browse-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-amber);
    background: var(--amber-dim);
    border: 1px solid var(--border-amber);
    border-radius: 99px;
    padding: 4px 10px;
    margin-bottom: 14px;
}
.browse-hero-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(26px, 2.4vw, 36px);
    line-height: 1.08;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}
.browse-hero-text {
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 40ch;
}

/* ─── Browse Search Bar (matches dashboard style) ─── */
.browse-hero-search {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-mid);
    border-radius: 999px; /* pill shape */
    padding: 4px;
    height: 42px; /* same height as dashboard */
    width: 100%;
    max-width: 480px; /* slightly wider on browse, but still a pill */
    overflow: hidden; /* clips inner input to round shape */
    transition:
        border-color 0.2s,
        background 0.2s,
        box-shadow 0.2s;
}

.browse-hero-search:focus-within {
    border-color: var(--border-amber);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.12);
}

.browse-hero-search input {
    background: none !important;
    border: none !important;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    flex: 1;
    height: 100%;
    line-height: 1;
    padding: 0;
}

.browse-hero-search input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

/* Browse search icon – amber, matching dashboard */
.browse-hero-search .search-btn {
    color: #d9e8ff;
    opacity: 1;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(18, 38, 74, 0.9);
    border: 1px solid rgba(172, 199, 236, 0.28);
    transition:
        background 0.15s,
        border-color 0.15s,
        color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.browse-hero-search .search-btn:hover {
    color: #ffffff;
    background: rgba(29, 55, 99, 0.96);
    border-color: rgba(196, 218, 248, 0.48);
}

.browse-hero-search:focus-within .search-btn {
    color: #ffffff;
    background: rgba(29, 55, 99, 0.96);
    border-color: rgba(245, 166, 35, 0.52);
}

.browse-hero-search .search-btn svg {
    width: 16px;
    height: 16px;
    display: block;
    stroke: currentColor;
    stroke-width: 2.25;
}

.browse-hero-search .search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-height: 34px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 999px;
    padding: 0 10px 0 14px;
}
.browse-hero-search .search-input-wrapper input {
    background: transparent;
    border: none;
    outline: none;
    color: #203559;
    font-size: 13px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    flex: 1;
    width: 100%;
}
.browse-hero-search .search-input-wrapper input::placeholder {
    color: #6f86aa;
}

.browse-hero-search .clear-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    opacity: 0.75;
    transition: opacity 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.browse-hero-search .clear-btn:hover {
    opacity: 1;
    background: rgba(15, 34, 64, 0.08);
    border-radius: 999px;
}
.browse-hero-search .clear-btn img {
    width: 12px;
    height: 12px;
    filter: none;
    opacity: 0.75;
}

/* User browse keeps a darker, cleaner search treatment */
.user-dashboard-shell .browse-hero-search {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.user-dashboard-shell .browse-hero-search:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(245, 166, 35, 0.6);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.14);
}

.user-dashboard-shell .browse-hero-search .search-input-wrapper {
    background: transparent;
    border-radius: 999px;
    padding: 0 8px 0 12px;
}

.user-dashboard-shell .browse-hero-search .search-input-wrapper input {
    color: var(--text-primary);
}

.user-dashboard-shell .browse-hero-search .search-input-wrapper input::placeholder {
    color: var(--text-muted);
}

.user-dashboard-shell .browse-hero-search .clear-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.user-dashboard-shell .browse-hero-search .clear-btn img {
    opacity: 0.65;
    filter: invert(1);
}

.browse-hero-search .search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-amber);
    display: flex;
    align-items: center;
}
.browse-hero-search .search-btn img {
    width: 18px;
    height: 18px;
    filter: invert(1);
}

/* Browse page search button image (the magnifying glass) */
.browse-hero-search .search-btn img {
    filter: none !important; /* remove any invert filter that dims it */
    opacity: 1 !important;
    width: 18px;
    height: 18px;
    transition: opacity 0.15s;
}

.browse-hero-search .search-btn:hover img {
    opacity: 0.85;
}

.browse-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 14px;
    margin-top: 16px;
}
.browse-hero-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.browse-hero-stat strong {
    font-size: clamp(14px, 1.2vw, 18px);
    font-weight: 700;
    color: var(--text-amber);
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.browse-hero-stat span {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.35;
}

.filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 0 8px;
}

.category-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.category-filters a,
.browse-filter-row a {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 99px;
    padding: 6px 14px;
    transition: all 0.15s;
    text-decoration: none;
}
.category-filters a:hover,
.browse-filter-row a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    text-decoration: none;
}
.category-filters a.active-filter,
.browse-filter-row a.active-filter {
    background: linear-gradient(135deg, var(--amber), var(--amber-bright));
    color: #06090f;
    border-color: transparent;
    font-weight: 700;
}

.sort-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0 16px;
}
.sort-filters span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.sort-btn {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 99px;
    padding: 5px 14px;
    transition: all 0.15s;
    text-decoration: none;
}
.sort-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    text-decoration: none;
}
.sort-btn.active-filter {
    background: linear-gradient(135deg, var(--amber), var(--amber-bright));
    color: #06090f;
    border-color: transparent;
}

.browse-story-stage {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 16px;
    margin-bottom: 24px;
}

.browse-featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: var(--r-xl);
    overflow: hidden;
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
    backdrop-filter: blur(12px);
}
.browse-featured-card:hover {
    border-color: var(--border-amber);
    box-shadow: var(--shadow-glow-amber);
}
.browse-featured-media {
    position: relative;
    min-height: 300px;
}
.browse-featured-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.browse-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(4, 8, 20, 0.1) 0%, rgba(4, 8, 20, 0.7) 100%);
}
.browse-featured-topline {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 2;
}
.browse-featured-tag {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-amber);
    background: rgba(245, 166, 35, 0.18);
    border: 1px solid var(--border-amber);
    border-radius: 99px;
    padding: 4px 10px;
}
.browse-featured-tag::before {
    content: '★';
}
.browse-featured-score {
    font-size: 11px;
    font-weight: 700;
    color: var(--success);
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: 99px;
    padding: 3px 9px;
}
.browse-featured-body {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.browse-featured-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.browse-verified-pill {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--success);
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: 99px;
    padding: 3px 9px;
}
.browse-featured-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(20px, 2vw, 28px);
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 400;
    letter-spacing: -0.01em;
}
.browse-featured-title a {
    color: inherit;
    transition: color 0.15s;
}
.browse-featured-title a:hover {
    color: var(--text-amber);
    text-decoration: none;
}
.browse-featured-excerpt {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 18px;
}
.browse-featured-credibility {
    margin-bottom: 18px;
}
.browse-featured-cred-head {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.browse-featured-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 99px;
    overflow: hidden;
}
.browse-featured-track span {
    display: block;
    height: 100%;
    min-width: 12px;
    background: linear-gradient(90deg, var(--amber), var(--amber-bright));
    border-radius: 99px;
}
.browse-featured-card.featured-trust-high .browse-featured-track span,
.browse-featured-story.featured-trust-high .browse-featured-track span {
    background: var(--success);
}
.browse-featured-card.featured-trust-mid .browse-featured-track span,
.browse-featured-story.featured-trust-mid .browse-featured-track span {
    background: var(--warning);
}
.browse-featured-card.featured-trust-low .browse-featured-track span,
.browse-featured-story.featured-trust-low .browse-featured-track span {
    background: var(--danger);
}
.browse-featured-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}
.browse-featured-author {
    display: flex;
    align-items: center;
    gap: 8px;
}
.browse-featured-stats {
    display: flex;
    gap: 12px;
    font-size: 11.5px;
    color: var(--text-muted);
}

.browse-side-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.browse-side-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    padding: 20px;
    backdrop-filter: blur(12px);
    height: 100%;
}
.browse-side-kicker {
    display: inline-block;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-amber);
    background: var(--amber-dim);
    border: 1px solid var(--border-amber);
    border-radius: 99px;
    padding: 3px 9px;
    margin-bottom: 10px;
}
.browse-side-card h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 17px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: 14px;
}
.browse-side-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
}
.browse-side-list li {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.55;
    padding-left: 14px;
    position: relative;
}
.browse-side-list li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--amber);
    font-weight: 700;
}

.browse-article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 24px 36px;
    justify-content: center;
}
.page-btn {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-sm);
    padding: 7px 16px;
    transition: all 0.15s;
    text-decoration: none;
}
.page-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    text-decoration: none;
}
.page-btn.disabled {
    opacity: 0.35;
    pointer-events: none;
}
.page-form {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-muted);
}
.page-input {
    width: 52px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-mid);
    border-radius: var(--r-sm);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12.5px;
    text-align: center;
    padding: 5px 6px;
    outline: none;
}
.page-input:focus {
    border-color: var(--border-amber);
    background: rgba(245, 166, 35, 0.04);
}

/* ═══════════════════════════════════════════════════════════════
   ARTICLE DETAIL PAGE
   ═══════════════════════════════════════════════════════════════ */
.article-detail {
    max-width: 780px;
    margin: 0 auto;
}

.article-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text-secondary);
}
.icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-mid);
    color: var(--text-primary);
}
.icon-btn.active {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-subtle);
    color: #f5a623;
}
.icon-btn.active:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-mid);
}
.icon-btn.active img {
    filter: brightness(0) saturate(100%) invert(72%) sepia(88%) saturate(1058%) hue-rotate(347deg) brightness(99%) contrast(94%);
}
.icon-btn img {
    width: 16px;
    height: 16px;
    filter: invert(0.7);
}
.icon-btn.flagged {
    opacity: 0.5;
    cursor: not-allowed;
    border: none;
    background: rgba(255, 255, 255, 0.04);
}

.article-banner {
    border-radius: var(--r-lg);
    overflow: hidden;
    margin: 20px 0 28px;
    border: 1px solid var(--border-subtle);
}
.article-banner img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

.article-body img {
    position: static !important;
    inset: auto !important;
    float: none !important;
    clear: both !important;
    display: block !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 18px auto !important;
    border-radius: 12px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.article-summary {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    padding: 20px 22px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}
.summary-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-amber);
    margin-bottom: 10px;
}
.summary-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* AI overview */
.ai-overview-panel {
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: var(--r-lg);
    padding: 20px 22px;
    margin-bottom: 28px;
}
.ai-overview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.ai-overview-title h3 {
    font-size: 14px;
    font-weight: 700;
    color: #a5b4fc;
    letter-spacing: 0.02em;
}
.ai-overview-body {
    margin-top: 14px;
}
.ai-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}
.ai-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.22);
    border-radius: 99px;
    padding: 3px 9px;
}
.ai-badge-muted {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-subtle);
}
.ai-section {
    margin-bottom: 14px;
}
.ai-section h4 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.ai-section p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.65;
}
.ai-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 0;
}
.ai-section ul li {
    font-size: 13px;
    color: var(--text-secondary);
    padding-left: 16px;
    position: relative;
    line-height: 1.55;
}
.ai-section ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: #a5b4fc;
    font-weight: 700;
}
.ai-loading {
    font-size: 13px;
    color: var(--text-muted);
    padding: 12px 0;
    font-style: italic;
}

.article-content-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 28px 0 14px;
}

.article-body {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
}
.article-body p {
    margin-bottom: 1.4em;
    color: var(--text-primary);
}
.article-body h2,
.article-body h3 {
    font-family: 'DM Serif Display', serif;
    color: var(--text-primary);
    margin: 1.8em 0 0.7em;
    font-weight: 400;
    line-height: 1.2;
}
.article-body h2 {
    font-size: 22px;
}
.article-body h3 {
    font-size: 18px;
}
.article-body a {
    color: var(--text-amber);
}
.article-body blockquote {
    border-left: 3px solid var(--amber);
    padding-left: 18px;
    margin: 1.8em 0;
    color: var(--text-secondary);
    font-style: italic;
}

.paywall-box {
    background:
        radial-gradient(ellipse at top right, rgba(139, 92, 246, 0.2), transparent 60%),
        radial-gradient(ellipse at bottom left, rgba(99, 102, 241, 0.12), transparent 60%),
        var(--navy-800);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: var(--r-xl);
    padding: 36px;
    text-align: center;
    margin-top: 28px;
}
.paywall-title {
    display: flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    margin: 0 auto 12px auto;
}
.paywall-title img {
    width: 24px;
    height: 24px;
}
.paywall-title span {
    font-family: 'DM Serif Display', serif;
    font-size: 20px;
    color: var(--text-primary);
}
.paywall-box p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 18px;
}
.paywall-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    margin-bottom: 22px;
}
.price-main {
    font-family: 'DM Serif Display', serif;
    font-size: 32px;
    color: var(--text-amber);
}
.price-suffix {
    font-size: 13px;
    color: var(--text-muted);
}

/* TTS */
.tts-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.tts-btn {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-sm);
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.tts-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--border-mid);
}

/* Share menu */
.share-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--navy-800);
    border: 1px solid var(--border-mid);
    border-radius: var(--r-md);
    padding: 6px;
    z-index: 200;
    min-width: 140px;
    box-shadow: var(--shadow-elevated);
}
.share-menu.hidden {
    display: none;
}
.share-option {
    display: block;
    width: 100%;
    text-align: left;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    padding: 7px 12px;
    border-radius: var(--r-sm);
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition:
        background 0.12s,
        color 0.12s;
}
.share-option:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

/* comment styling */
.comments-container {
    max-width: 100%;
}

.comment-form-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    padding: 20px 22px;
    margin-bottom: 28px;
    backdrop-filter: blur(10px);
}

.comment-form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: block;
}

.comment-form-label span {
    color: var(--text-amber);
}

/* Make comment body text readable */
.comment-body {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

.comment-remove-btn {
    font-size: 11px;
    padding: 2px 8px;
    color: var(--text-muted);
}

.comments-empty {
    text-align: center;
    padding: 32px 0;
    color: var(--text-muted);
}

/* Flag modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal.hidden {
    display: none;
}
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 20, 0.78);
    backdrop-filter: blur(4px);
}
.modal-content {
    position: relative;
    z-index: 1;
    background: var(--navy-800);
    border: 1px solid var(--border-mid);
    border-radius: var(--r-xl);
    padding: 32px 36px;
    width: 480px;
    max-width: 90vw;
    box-shadow: var(--shadow-elevated);
}
.modal-content h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.modal-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 22px;
}
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.form-group label input[type='radio'] {
    accent-color: var(--amber);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    text-decoration: none;
}
.btn-ghost.btn-sm,
.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}
.btn-danger {
    background: rgba(255, 107, 138, 0.12);
    color: var(--danger);
    border: 1px solid rgba(255, 107, 138, 0.3);
}
.btn-danger:hover {
    background: rgba(255, 107, 138, 0.2);
}

/*flagged articles style*/
.flagged-report-card {
    background: rgba(255, 231, 231, 0.055);
    border: 1px solid var(--border-mid);
}

/* ═══════════════════════════════════════════════════════════════
   MY ARTICLES PAGE
   ═══════════════════════════════════════════════════════════════ */
.my-articles-shell {
    max-width: 900px;
}
.my-articles-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 20px;
}
.article-toggle {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
    padding: 4px;
    margin-bottom: 20px;
    width: fit-content;
}
.toggle-btn {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    border-radius: var(--r-sm);
    padding: 7px 18px;
    transition: all 0.15s;
    text-decoration: none;
}
.toggle-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}
.toggle-btn.active {
    background: var(--amber-dim);
    color: var(--text-amber);
    border: 1px solid var(--border-amber);
}

.my-articles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.my-article-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
    backdrop-filter: blur(10px);
}
.my-article-card:hover {
    border-color: var(--border-amber);
    box-shadow: var(--shadow-glow-amber);
}
.my-article-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
}
.my-article-info {
    flex: 1;
    min-width: 0;
}
.my-article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.my-article-time {
    font-size: 11px;
    color: var(--text-muted);
}
.my-article-title {
    font-family: 'DM Serif Display', serif;
    font-size: 17px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 6px;
}
.my-article-link {
    color: inherit;
}
.my-article-link:hover {
    color: var(--text-amber);
    text-decoration: none;
}
.my-article-excerpt {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.55;
}
.my-article-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
    padding-top: 2px;
}
.my-article-actions form {
    display: flex;
    margin: 0;
}
.my-article-delete-btn {
    color: var(--danger) !important;
    border-color: rgba(255, 107, 138, 0.22) !important;
    background: rgba(255, 107, 138, 0.06) !important;
}
.my-article-delete-btn:hover {
    background: rgba(255, 107, 138, 0.14) !important;
}
.my-articles-empty-card {
    text-align: center;
    padding: 48px 32px;
    background: var(--surface-card);
    border: 1px dashed var(--border-mid);
    border-radius: var(--r-xl);
}
.my-articles-empty-title {
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.my-articles-empty-copy {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 36ch;
    margin-left: auto;
    margin-right: auto;
}
.my-articles-create-btn {
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SAVED ARTICLES PAGE
   ═══════════════════════════════════════════════════════════════ */
.saved-empty-state {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 48px 0;
    text-align: center;
}
.saved-feature-paywall {
    width: min(100%, 620px);
    margin: 56px auto 0;
    padding: 42px 38px;
    text-align: center;
    background:
        radial-gradient(ellipse at top, rgba(245, 166, 35, 0.16), transparent 58%),
        radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.18), transparent 62%),
        var(--navy-800);
    border: 1px solid rgba(245, 166, 35, 0.22);
    border-radius: var(--r-xl);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}
.saved-feature-lock {
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    border-radius: 20px;
    background: rgba(245, 166, 35, 0.12);
    border: 1px solid rgba(245, 166, 35, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
}
.saved-feature-lock img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}
.saved-feature-kicker {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(245, 166, 35, 0.1);
    border: 1px solid rgba(245, 166, 35, 0.28);
    color: var(--text-amber);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.saved-feature-paywall h2 {
    max-width: 13ch;
    margin: 0 auto 14px;
    font-family: 'DM Serif Display', serif;
    font-size: 34px;
    font-weight: 400;
    line-height: 1.08;
    color: var(--text-primary);
}
.saved-feature-paywall p {
    max-width: 52ch;
    margin: 0 auto 18px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}
.saved-feature-count {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
}
.saved-feature-count span {
    color: var(--text-amber);
    font-weight: 800;
}
.saved-feature-btn {
    margin-top: 4px;
}

.paywall-card {
    background:
        radial-gradient(ellipse at top right, rgba(139, 92, 246, 0.2), transparent 60%),
        var(--navy-800);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: var(--r-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}
.paywall-inner {
    text-align: center;
    padding: 24px;
}
.paywall-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 14px;
    display: block;
}
.paywall-inner h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.paywall-inner p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 18px;
}
.highlight-number {
    color: var(--text-amber);
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   WRITE ARTICLE PAGE
   ═══════════════════════════════════════════════════════════════ */
.write-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 480px);
    gap: 28px;
    align-items: start;
}
.write-editor-shell .image-upload-container {
    align-items: flex-start;
    flex-wrap: wrap;
}
.write-editor-shell .image-preview {
    width: min(100%, 520px);
    height: 300px;
    border-radius: var(--r-md);
    border: 1px solid var(--border-mid);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.write-editor-shell .image-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}
.write-editor-shell .image-preview span {
    font-size: 12px;
    color: var(--text-muted);
}
.write-editor-shell .write-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.write-editor-shell .write-field-head .profile-bio-counter {
    margin-top: 0;
}
.write-editor-shell .write-field-head label {
    margin-bottom: 6px;
}
.write-content-shell {
    position: relative;
    border-radius: var(--r-md);
    overflow: hidden;
}
.write-content-mirror,
.write-content-input {
    width: 100%;
    min-height: 250px;
    padding: 14px 16px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13.5px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}
.write-content-mirror {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    color: rgba(226, 232, 240, 0.96);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(12, 18, 31, 0.98));
    border: 1px solid var(--border-mid);
    border-radius: var(--r-md);
}
.write-content-input {
    position: relative;
    z-index: 2;
    resize: vertical;
    background: transparent;
    border: 1px solid var(--border-mid);
    border-radius: var(--r-md);
    color: transparent;
    -webkit-text-fill-color: transparent;
    caret-color: #f8fafc;
    text-shadow: none;
    outline: none;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}
.write-content-input::selection {
    background: rgba(125, 211, 252, 0.38);
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.write-content-input:focus {
    background: rgba(255, 255, 255, 0.015);
    border-color: var(--border-amber);
    box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.12);
}
.write-content-input::-webkit-scrollbar,
.write-content-mirror::-webkit-scrollbar {
    width: 10px;
}
.write-content-input::-webkit-scrollbar-thumb,
.write-content-mirror::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.32);
    border-radius: 999px;
}
.write-content-input::-webkit-scrollbar-track,
.write-content-mirror::-webkit-scrollbar-track {
    background: transparent;
}
.user-dashboard-shell .ai-inline-highlight {
    display: inline;
    position: relative;
    padding: 0.08em 0.12em;
    border-radius: 0.38em;
    color: #f8fafc;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}
.user-dashboard-shell .ai-inline-highlight[data-sentence-number]::before {
    content: attr(data-sentence-number);
    position: absolute;
    top: -1.45em;
    left: 0;
    min-width: 1.6em;
    padding: 0.12em 0.42em;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.02em;
    text-align: center;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.38);
    box-shadow: 0 4px 10px rgba(2, 6, 23, 0.22);
}
.user-dashboard-shell .ai-inline-highlight.is-supported[data-sentence-number]::before {
    color: #d1fae5;
    border-color: rgba(74, 222, 128, 0.45);
}
.user-dashboard-shell .ai-inline-highlight.is-weak[data-sentence-number]::before {
    color: #fef3c7;
    border-color: rgba(251, 191, 36, 0.48);
}
.user-dashboard-shell .ai-inline-highlight.is-clarity[data-sentence-number]::before {
    color: #dbeafe;
    border-color: rgba(96, 165, 250, 0.48);
}
.user-dashboard-shell .ai-inline-highlight.is-contradicted[data-sentence-number]::before {
    color: #fee2e2;
    border-color: rgba(248, 113, 113, 0.48);
}
.user-dashboard-shell .ai-inline-highlight.is-supported {
    background: rgba(34, 197, 94, 0.28);
    box-shadow:
        inset 0 0 0 1px rgba(74, 222, 128, 0.42),
        inset 0 -0.14em 0 rgba(21, 128, 61, 0.22);
}
.user-dashboard-shell .ai-inline-highlight.is-weak {
    background: rgba(245, 158, 11, 0.34);
    box-shadow:
        inset 0 0 0 1px rgba(251, 191, 36, 0.42),
        inset 0 -0.14em 0 rgba(180, 83, 9, 0.24);
}
.user-dashboard-shell .ai-inline-highlight.is-clarity {
    background: rgba(59, 130, 246, 0.30);
    box-shadow:
        inset 0 0 0 1px rgba(96, 165, 250, 0.45),
        inset 0 -0.14em 0 rgba(37, 99, 235, 0.24);
}
.user-dashboard-shell .ai-inline-highlight.is-contradicted {
    background: rgba(239, 68, 68, 0.34);
    box-shadow:
        inset 0 0 0 1px rgba(248, 113, 113, 0.46),
        inset 0 -0.14em 0 rgba(185, 28, 28, 0.26);
}
.user-dashboard-shell .ai-highlight-focus {
    filter: brightness(1.08);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.72),
        0 0 0 2px rgba(255, 255, 255, 0.18),
        0 0 18px rgba(255, 255, 255, 0.12);
}
.user-dashboard-shell .write-content-input.ai-content-focus-supported {
    border-color: rgba(74, 222, 128, 0.9);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
}
.user-dashboard-shell .write-content-input.ai-content-focus-weak {
    border-color: rgba(251, 191, 36, 0.92);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}
.user-dashboard-shell .write-content-input.ai-content-focus-clarity {
    border-color: rgba(96, 165, 250, 0.92);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}
.user-dashboard-shell .write-content-input.ai-content-focus-contradicted {
    border-color: rgba(248, 113, 113, 0.92);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16);
}
.write-form-panel {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-xl);
    padding: 28px;
    backdrop-filter: blur(10px);
}
.write-form-panel h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 24px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 22px;
    letter-spacing: -0.01em;
}
.form-group label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}
input[type='text'],
input[type='url'],
input[type='email'],
input[type='password'],
select {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-mid);
    border-radius: var(--r-md);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13.5px;
    padding: 10px 14px;
    outline: none;
    transition:
        border-color 0.2s,
        background 0.2s;
}
input[type='text']:focus,
input[type='url']:focus,
input[type='email']:focus,
input[type='password']:focus,
select:focus {
    border-color: var(--border-amber);
    background: rgba(245, 166, 35, 0.03);
}
input::placeholder {
    color: var(--text-muted);
}
select option {
    background: var(--navy-800);
    color: var(--text-primary);
}

/* Edit password */
body.page-edit-password .user-dashboard-shell .page-content {
    max-width: 460px;
    padding: 36px 32px;
}

body.page-edit-password .user-dashboard-shell form {
    display: grid;
    gap: 10px;
}

body.page-edit-password .user-dashboard-shell form label {
    display: block;
    margin-top: 10px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
}

body.page-edit-password .user-dashboard-shell input[type='password'] {
    display: block;
    width: 100%;
    min-height: 44px;
    margin: 0 0 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-mid);
    border-radius: var(--r-md);
    color: var(--text-primary);
    box-sizing: border-box;
}

body.page-edit-password .user-dashboard-shell input[type='password']:focus {
    border-color: var(--border-amber);
    background: rgba(245, 166, 35, 0.03);
    outline: none;
}

body.page-edit-password .user-dashboard-shell .btn-primary {
    width: max-content;
    margin-top: 14px;
}

body.page-edit-password .user-dashboard-shell .page-content a {
    color: var(--amber);
    font-weight: 600;
}

.write-actions {
    display: flex;
    align-items: center; /* vertically center the buttons */
    justify-content: flex-start; /* or center if you prefer */
    gap: 12px;
    flex-wrap: wrap;
}

/* ─── AI VERIFY PANEL (sidebar) ──────────────────────────────────── */
.ai-verify-panel {
    background:
        radial-gradient(ellipse at top right, rgba(99, 102, 241, 0.15), transparent 50%),
        var(--navy-800);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--r-xl);
    padding: 22px;
    position: sticky;
    top: 24px;
}
.ai-verify-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
}
.ai-verify-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #a5b4fc;
}

/* Small score ring (sidebar) */
.ai-score-ring {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgba(99, 102, 241, 0.25);
    background: rgba(99, 102, 241, 0.08);
    font-family: 'DM Serif Display', serif;
    font-size: 18px;
    color: var(--text-primary);
    margin: 12px auto;
}

/* Large score ring (main AI verification card) */
.user-dashboard-shell .ai-score-ring {
    --score: 50;
    width: 100px;
    height: 100px;
    border: none;
    background: conic-gradient(
        var(--amber) 0% calc(var(--score) * 1%),
        rgba(255, 255, 255, 0.07) calc(var(--score) * 1%) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0 auto;
}
.user-dashboard-shell .ai-score-ring-inner {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: var(--navy-800);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.user-dashboard-shell .ai-score-ring-inner span:first-child {
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1;
}
.user-dashboard-shell .ai-score-ring-inner span:last-child {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 2px;
}

.ai-verdict-headline {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 14px;
}
.ai-metrics {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 14px 0;
}
.ai-metric-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ai-metric-label {
    font-size: 11px;
    color: var(--text-muted);
    width: 120px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ai-metric-track {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 99px;
    overflow: hidden;
}
.ai-metric-fill {
    height: 100%;
    background: linear-gradient(90deg, #818cf8, #a5b4fc);
    border-radius: 99px;
    transition: width 0.6s var(--ease);
}
.ai-metric-val {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    width: 30px;
    text-align: right;
}

.publish-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.publish-lock-msg {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 10px;
    text-align: center;
}

.image-upload-area {
    border: 1px dashed var(--border-mid);
    border-radius: var(--r-md);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.02);
}
.image-upload-area:hover {
    border-color: var(--border-amber);
    background: var(--amber-dim);
}
.image-upload-area p {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.content-mirror-wrapper {
    position: relative;
}
.content-mirror {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13.5px;
    line-height: 1.6;
    color: transparent;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 12px 14px;
    overflow: hidden;
}
mark.highlight-supported {
    background: rgba(46, 223, 154, 0.18);
    border-radius: 2px;
}
mark.highlight-weak {
    background: rgba(255, 184, 48, 0.18);
    border-radius: 2px;
}
mark.highlight-clarity {
    background: rgba(99, 102, 241, 0.18);
    border-radius: 2px;
}
mark.highlight-contradicted {
    background: rgba(255, 107, 138, 0.22);
    border-radius: 2px;
}

/* ─── MAIN AI VERIFICATION CARD (write page) ──────────────────── */
.user-dashboard-shell .ai-verification-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-xl);
    padding: 30px;
    backdrop-filter: blur(12px);
}
.user-dashboard-shell .ai-results-dashboard {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.user-dashboard-shell .ai-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}
.user-dashboard-shell .ai-results-head h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 20px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.user-dashboard-shell .ai-results-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}
.user-dashboard-shell .ai-last-checked {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}
.user-dashboard-shell .ai-state-card {
    padding: 24px 0;
    text-align: center;
}
.user-dashboard-shell .ai-state-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.user-dashboard-shell .ai-state-card .text-muted {
    font-size: 12.5px;
    color: var(--text-muted);
}
.user-dashboard-shell .ai-overview-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    padding: 24px;
}
.user-dashboard-shell .ai-overview-grid {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
.user-dashboard-shell .ai-score-wrap {
    display: flex;
    justify-content: center;
    align-self: center;
}
.user-dashboard-shell .ai-overview-copy {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}
.user-dashboard-shell .ai-overview-kicker,
.user-dashboard-shell .ai-results-footer-kicker {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-amber);
}
.user-dashboard-shell .ai-score-formula {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
    font-family: 'IBM Plex Mono', monospace;
    word-break: break-word;
}
.user-dashboard-shell .ai-overview-copy h4 {
    font-family: 'DM Serif Display', serif;
    font-size: 34px;
    font-weight: 400;
    line-height: 1.05;
    color: var(--text-primary);
    margin: 0;
}
.user-dashboard-shell .ai-overview-copy p {
    margin: 0;
}
.user-dashboard-shell .ai-overview-copy #aiSummary {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
}
.user-dashboard-shell .ai-source-label {
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
    padding: 12px 14px;
}
.user-dashboard-shell .ai-overview-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}
.user-dashboard-shell .ai-meta-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
    padding: 14px 16px;
    min-width: 0;
}
.user-dashboard-shell .ai-meta-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.user-dashboard-shell .ai-meta-card strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
}

/* areas / stats */
.user-dashboard-shell .ai-area-stat {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
    padding: 10px;
    text-align: center;
}
.user-dashboard-shell .ai-area-stat strong {
    display: block;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}
.user-dashboard-shell .ai-area-stat span {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 2px;
}
.user-dashboard-shell .ai-area-stat small {
    font-size: 9px;
    color: var(--text-muted);
    display: block;
}
.user-dashboard-shell .ai-area-stat.is-contradicted strong,
.user-dashboard-shell .ai-area-stat.is-contradicted span {
    color: var(--danger);
}
.user-dashboard-shell .ai-area-stat.is-weak strong,
.user-dashboard-shell .ai-area-stat.is-weak span {
    color: var(--warning);
}
.user-dashboard-shell .ai-area-stat.is-clarity strong,
.user-dashboard-shell .ai-area-stat.is-clarity span {
    color: var(--text-secondary);
}
.user-dashboard-shell .ai-area-stat.is-total strong,
.user-dashboard-shell .ai-area-stat.is-total span {
    color: var(--text-amber);
}

.user-dashboard-shell .ai-areas-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.user-dashboard-shell .ai-impact-card {
    background: rgba(255, 107, 138, 0.08);
    border: 1px solid rgba(255, 107, 138, 0.2);
    border-radius: var(--r-md);
    padding: 10px 14px;
    text-align: center;
    white-space: normal;
}
.user-dashboard-shell .ai-impact-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--danger);
    display: block;
}
.user-dashboard-shell .ai-impact-card strong {
    font-family: 'DM Serif Display', serif;
    font-size: 20px;
    color: var(--danger);
    line-height: 1;
    margin: 4px 0;
    display: block;
}
.user-dashboard-shell .ai-impact-note {
    font-size: 9.5px;
    color: var(--text-muted);
}
.user-dashboard-shell .ai-area-stat-impact {
    min-width: 0;
}
.user-dashboard-shell .ai-area-stat-impact strong,
.user-dashboard-shell .ai-area-stat-impact .ai-impact-label {
    color: var(--danger);
}

.user-dashboard-shell .ai-pill-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.user-dashboard-shell .ai-pill {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 6px 12px;
    border: 1px solid;
}
.user-dashboard-shell .ai-pill-supported {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success);
}
.user-dashboard-shell .ai-pill-contradicted {
    background: rgba(255, 107, 138, 0.1);
    border-color: rgba(255, 107, 138, 0.3);
    color: var(--danger);
}
.user-dashboard-shell .ai-pill-weak {
    background: rgba(255, 184, 48, 0.1);
    border-color: rgba(255, 184, 48, 0.3);
    color: var(--warning);
}

.user-dashboard-shell .ai-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.user-dashboard-shell .ai-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
    padding: 16px 14px;
    text-align: center;
}
.user-dashboard-shell .ai-stat-card strong {
    display: block;
    font-family: 'DM Serif Display', serif;
    font-size: 24px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}
.user-dashboard-shell .ai-stat-card span {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 2px;
}
.user-dashboard-shell .ai-stat-card p {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.4;
}
.user-dashboard-shell .ai-stat-supported span {
    color: var(--success);
}
.user-dashboard-shell .ai-stat-contradicted span {
    color: var(--danger);
}
.user-dashboard-shell .ai-stat-weak span {
    color: var(--warning);
}
.user-dashboard-shell .ai-stat-total span {
    color: var(--text-amber);
}

.user-dashboard-shell .ai-issue-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
    padding: 12px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition:
        border-color 0.15s,
        background 0.15s;
    font-family: 'Plus Jakarta Sans', sans-serif;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 6px;
}
.user-dashboard-shell .ai-claims-group + .ai-claims-group {
    margin-top: 14px;
}
.user-dashboard-shell .ai-claims-group-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}
.user-dashboard-shell .ai-claims-group-title span {
    font-size: 11px;
    font-weight: 600;
    color: var(--success);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.user-dashboard-shell .ai-claims-group-title.is-weak span {
    color: var(--warning);
}
.user-dashboard-shell .ai-issue-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.user-dashboard-shell .ai-issue-card:hover {
    border-color: var(--border-amber);
    background: rgba(255, 255, 255, 0.05);
}
.user-dashboard-shell .ai-issue-badge {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 2px 8px;
    border: 1px solid;
    width: fit-content;
}
.user-dashboard-shell .ai-issue-score,
.user-dashboard-shell .ai-area-item-score {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    padding: 4px 8px;
    width: fit-content;
}
.user-dashboard-shell .ai-issue-card.is-supported .ai-issue-badge {
    color: var(--success);
    border-color: var(--success-border);
    background: var(--success-bg);
}
.user-dashboard-shell .ai-issue-card.is-weak .ai-issue-badge {
    color: var(--warning);
    border-color: rgba(255, 184, 48, 0.3);
    background: rgba(255, 184, 48, 0.1);
}
.user-dashboard-shell .ai-issue-card.is-contradicted .ai-issue-badge {
    color: var(--danger);
    border-color: rgba(255, 107, 138, 0.3);
    background: rgba(255, 107, 138, 0.1);
}
.user-dashboard-shell .ai-issue-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
}
.user-dashboard-shell .ai-issue-meta {
    font-size: 11px;
    color: var(--text-muted);
}
.user-dashboard-shell .ai-issue-action {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-amber);
    margin-top: 4px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.user-dashboard-shell .ai-area-group {
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
    margin-bottom: 10px;
    overflow: hidden;
}
.user-dashboard-shell .ai-area-group.is-contradicted {
    border-color: rgba(248, 113, 113, 0.34);
    background: linear-gradient(180deg, rgba(127, 29, 29, 0.16), rgba(255, 255, 255, 0.02) 22%);
}
.user-dashboard-shell .ai-area-group.is-weak {
    border-color: rgba(251, 191, 36, 0.30);
    background: linear-gradient(180deg, rgba(120, 53, 15, 0.16), rgba(255, 255, 255, 0.02) 22%);
}
.user-dashboard-shell .ai-area-group.is-clarity {
    border-color: rgba(96, 165, 250, 0.28);
    background: linear-gradient(180deg, rgba(30, 64, 175, 0.14), rgba(255, 255, 255, 0.02) 22%);
}
.user-dashboard-shell .ai-results-dashboard > .ai-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    padding: 20px;
    margin-bottom: 0;
}
.user-dashboard-shell .ai-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.user-dashboard-shell .ai-section-head h4 {
    margin: 0 0 4px;
}
.user-dashboard-shell .ai-section-head p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-muted);
}
.user-dashboard-shell .ai-area-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}
.user-dashboard-shell .ai-area-group.is-contradicted .ai-area-summary {
    background: rgba(127, 29, 29, 0.24);
}
.user-dashboard-shell .ai-area-group.is-weak .ai-area-summary {
    background: rgba(146, 64, 14, 0.22);
}
.user-dashboard-shell .ai-area-group.is-clarity .ai-area-summary {
    background: rgba(30, 64, 175, 0.20);
}
.user-dashboard-shell .ai-area-summary-impact {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 999px;
    padding: 4px 10px;
}
.user-dashboard-shell .ai-area-group.is-contradicted .ai-area-summary-impact {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.18);
}
.user-dashboard-shell .ai-area-group.is-weak .ai-area-summary-impact {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.18);
}
.user-dashboard-shell .ai-area-group.is-clarity .ai-area-summary-impact {
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.18);
}
.user-dashboard-shell .ai-area-body {
    display: grid;
    gap: 12px;
    padding: 14px;
}
.user-dashboard-shell .ai-area-item {
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
    padding: 14px;
    background: rgba(255, 255, 255, 0.025);
}
.user-dashboard-shell .ai-area-item.is-contradicted {
    border-color: rgba(248, 113, 113, 0.30);
    background: rgba(127, 29, 29, 0.14);
}
.user-dashboard-shell .ai-area-item.is-weak {
    border-color: rgba(251, 191, 36, 0.26);
    background: rgba(120, 53, 15, 0.12);
}
.user-dashboard-shell .ai-area-item.is-clarity {
    border-color: rgba(96, 165, 250, 0.26);
    background: rgba(30, 64, 175, 0.10);
}
.user-dashboard-shell .ai-area-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.user-dashboard-shell .ai-area-item-copy h5 {
    margin: 0 0 6px;
    font-size: 15px;
    color: var(--text-primary);
}
.user-dashboard-shell .ai-area-item-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.user-dashboard-shell .ai-area-item-copy p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text-secondary);
}
.user-dashboard-shell .ai-area-item-jump {
    flex-shrink: 0;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
    padding: 8px 12px;
    cursor: pointer;
}
.user-dashboard-shell .ai-area-item.is-contradicted .ai-area-item-jump {
    border-color: rgba(248, 113, 113, 0.34);
    color: #fee2e2;
}
.user-dashboard-shell .ai-area-item.is-weak .ai-area-item-jump {
    border-color: rgba(251, 191, 36, 0.34);
    color: #fde68a;
}
.user-dashboard-shell .ai-area-item.is-clarity .ai-area-item-jump {
    border-color: rgba(96, 165, 250, 0.34);
    color: #dbeafe;
}
.user-dashboard-shell .ai-area-examples {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}
.user-dashboard-shell .ai-area-example {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, 0.025);
    padding: 12px;
    color: var(--text-primary);
    text-align: left;
}
.user-dashboard-shell .ai-area-example.is-clickable {
    cursor: pointer;
}
.user-dashboard-shell .ai-area-example-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.user-dashboard-shell .ai-area-example-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.user-dashboard-shell .ai-area-example-sentence {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    padding: 4px 8px;
}
.user-dashboard-shell .ai-area-example strong {
    display: block;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 6px;
    color: var(--text-primary);
}
.user-dashboard-shell .ai-area-example-reason {
    display: block;
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-muted);
}
.user-dashboard-shell .ai-area-example-action {
    display: inline-block;
    margin-top: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-amber);
}
.user-dashboard-shell .ai-improve-guide-card {
    background: rgba(245, 166, 35, 0.04);
    border: 1px solid var(--border-amber);
    border-radius: var(--r-md);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
}
.user-dashboard-shell .ai-improve-guide-kicker {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-amber);
}
.user-dashboard-shell .ai-improve-guide-card p {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 4px 0 0;
}

/* Matched sources */
.user-dashboard-shell .ai-sources-disclosure {
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
    margin-bottom: 14px;
}
.user-dashboard-shell .ai-sources-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}
.user-dashboard-shell .ai-sources-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 12px;
    padding: 0 12px 12px;
}
.user-dashboard-shell .ai-source-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
    padding: 12px;
}
.user-dashboard-shell .ai-source-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.user-dashboard-shell .ai-source-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}
.user-dashboard-shell .ai-source-match {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--success);
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: 999px;
    padding: 1px 6px;
}
.user-dashboard-shell .ai-source-card strong {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 6px;
    display: block;
}
.user-dashboard-shell .ai-source-type {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.user-dashboard-shell .ai-source-card a {
    font-size: 11px;
    color: var(--text-amber);
    font-weight: 600;
    word-break: break-all;
}

.user-dashboard-shell .ai-guidance-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.user-dashboard-shell .ai-guidance-list li {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 16px;
    position: relative;
}
.user-dashboard-shell .ai-guidance-list li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--amber);
    font-weight: 700;
}
.user-dashboard-shell .ai-guidance-list-danger li::before {
    color: var(--danger);
}

.user-dashboard-shell .ai-success-box {
    padding: 14px 16px;
    border-radius: var(--r-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--success);
    background: var(--success-bg);
    border: 1px solid var(--success-border);
}
.user-dashboard-shell .ai-results-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.user-dashboard-shell .ai-metric-list {
    display: grid;
    gap: 12px;
}
.user-dashboard-shell .ai-metric-row {
    display: grid;
    gap: 8px;
}
.user-dashboard-shell .ai-metric-breakdown {
    display: grid;
    gap: 8px;
}
.user-dashboard-shell .ai-metric-breakdown-headline {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-secondary);
}
.user-dashboard-shell .ai-metric-breakdown-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.user-dashboard-shell .ai-metric-tag {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    padding: 5px 9px;
}
.user-dashboard-shell .ai-metric-lacking {
    display: grid;
    gap: 8px;
}
.user-dashboard-shell .ai-metric-lacking-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fca5a5;
}
.user-dashboard-shell .ai-metric-lacking-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.user-dashboard-shell .ai-metric-lacking-pill {
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.45;
    color: #fee2e2;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(248, 113, 113, 0.32);
    border-radius: 999px;
    padding: 6px 10px;
}
.user-dashboard-shell .ai-metric-label-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: var(--text-primary);
}
.user-dashboard-shell .ai-metric-label-line .text-muted {
    font-size: 12px;
    white-space: nowrap;
}
.user-dashboard-shell .progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}
.user-dashboard-shell .progress-bar > div {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f5a623 0%, #ffd163 100%);
    transition: width 0.35s ease;
}

@media (max-width: 1380px) {
    .write-layout {
        grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
        gap: 24px;
    }

    .user-dashboard-shell .ai-overview-grid {
        grid-template-columns: 132px minmax(0, 1fr);
        gap: 18px;
    }

    .user-dashboard-shell .ai-overview-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .user-dashboard-shell .ai-overview-grid {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .user-dashboard-shell .ai-overview-copy {
        align-items: center;
    }

    .user-dashboard-shell .ai-overview-meta,
    .user-dashboard-shell .ai-areas-summary,
    .user-dashboard-shell .ai-breakdown-grid,
    .user-dashboard-shell .ai-sources-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .user-dashboard-shell .ai-verification-card {
        padding: 20px 16px;
    }

    .user-dashboard-shell .ai-results-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .user-dashboard-shell .ai-last-checked {
        white-space: normal;
    }

    .user-dashboard-shell .ai-overview-copy h4 {
        font-size: 24px;
    }

    .user-dashboard-shell .ai-meta-card strong {
        font-size: 15px;
    }
}

/* ─── WRITE PAGE BUTTONS ─────────────────────────────────────── */
.user-dashboard-shell .btn-publish {
    background: linear-gradient(135deg, var(--amber) 0%, var(--amber-bright) 100%);
    color: #06090f;
    border: none;
    box-shadow: 0 4px 16px rgba(245, 166, 35, 0.25);
    cursor: pointer;
    transition: all 0.15s var(--ease);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    border-radius: var(--r-sm);
    padding: 9px 18px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    white-space: nowrap;
}
.user-dashboard-shell .btn-publish:hover {
    background: linear-gradient(135deg, var(--amber-bright) 0%, #ffd060 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.35);
    color: #06090f;
    text-decoration: none;
}
.user-dashboard-shell .btn-publish:disabled,
.user-dashboard-shell .btn-publish.is-locked {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.user-dashboard-shell .btn-draft {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-mid);
    cursor: pointer;
    transition: all 0.15s var(--ease);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--r-sm);
    padding: 9px 18px;
    line-height: 1;
    white-space: nowrap;
}
.user-dashboard-shell .btn-draft:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-amber);
    color: var(--text-primary);
    text-decoration: none;
}
.user-dashboard-shell .ai-guide-button {
    background: transparent;
    color: var(--text-amber);
    border: 1px solid var(--border-amber);
    border-radius: var(--r-sm);
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.15s,
        color 0.15s;
}
.user-dashboard-shell .ai-guide-button:hover {
    background: var(--amber-dim);
    color: var(--amber-bright);
}

/* ═══════════════════════════════════════════════════════════════
   PROFILE PAGE
   ═══════════════════════════════════════════════════════════════ */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}
.profile {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-xl);
    padding: 28px;
    backdrop-filter: blur(10px);
}
.profile-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}
.profile-header h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 24px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.image-upload-container {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}
.profile-avatar-preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1c3370, #0d1e42);
    border: 2px solid var(--border-amber);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--amber);
    overflow: hidden;
    flex-shrink: 0;
}
.profile-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.image-buttons {
    display: flex;
    gap: 8px;
}
.btn-dark {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-mid);
    border-radius: var(--r-sm);
    padding: 7px 14px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.btn-dark:hover {
    background: rgba(255, 255, 255, 0.1);
}
.btn-light {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-sm);
    padding: 7px 14px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.btn-light:hover {
    color: var(--danger);
    border-color: rgba(255, 107, 138, 0.3);
    background: rgba(255, 107, 138, 0.06);
}
.profile-upload-note {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.profile-field {
    margin-bottom: 16px;
}

.profile-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.profile-field input[readonly] {
    color: #8fa0bd;
    cursor: not-allowed;
    opacity: 1;
}

.profile-field-note {
    display: inline-block;
    font-size: 10px;
    color: var(--text-amber);
    background: rgba(245, 166, 35, 0.1);
    border: 1px solid rgba(245, 166, 35, 0.22);
    border-radius: var(--r-sm);
    font-weight: 700;
    margin-top: 8px;
    padding: 6px 10px;
}

.profile-bio-counter {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.profile-sidebar .dash-panel-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    padding: 18px;
    backdrop-filter: blur(12px);
    margin-bottom: 14px;
}
.profile-sidebar .dash-panel-card h3 {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
}

/* INTERESTS SECTION */
.interests-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06); /* subtle separator */
}

.interests-section h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.interests-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Grid of interest chips */
.interest-grid-profile {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

/* Individual chip styling */
.interest-chip-profile {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s;
}

.interest-chip-profile:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* Selected state */
.interest-chip-profile.selected {
    background: var(--amber-dim);
    color: var(--text-amber);
    border-color: var(--border-amber);
}

/* Counter line */
.interests-counter {
    font-size: 12px;
    color: var(--text-muted);
    margin: 8px 0 16px;
}

.interests-counter.error {
    color: var(--danger);
    font-weight: 600;
}

/* Save button */
.btn-save-interests {
    margin-top: 4px;
}

.profile-change-password,
.profile-feedback-section {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-xl);
    padding: 24px 28px;
    margin-top: 16px;
    backdrop-filter: blur(10px);
}
.profile-change-password h3,
.profile-feedback-section h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--text-primary);
}
.profile-feedback-section h3 {
    margin-bottom: 6px;
}

.profile-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.profile-password-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-mid);
    color: var(--text-secondary);
}
.profile-password-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* this is to hide checkboxes */
.interest-checkbox-profile {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Feedback panel (profile) */
.feedback-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-xl);
    padding: 24px;
    backdrop-filter: blur(12px);
}
.feedback-card h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 20px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.feedback-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}
.feedback-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
}

/* Star rating */
.rating-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 6px;
    margin-bottom: 16px;
}
.rating-stars input {
    display: none;
}
.rating-stars label {
    font-size: 22px;
    color: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition:
        color 0.15s,
        transform 0.15s;
}
.rating-stars input:checked ~ label,
.rating-stars label:hover,
.rating-stars label:hover ~ label {
    color: var(--amber);
    transform: scale(1.15);
}

.feedback-count {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    margin-bottom: 12px;
}
.feedback-submit-btn {
    background: linear-gradient(135deg, var(--amber), var(--amber-bright));
    color: #06090f;
    border: none;
    box-shadow: 0 4px 16px rgba(245, 166, 35, 0.25);
    font-weight: 700;
    width: 100%;
    justify-content: center;
}
.feedback-submit-btn:hover {
    background: linear-gradient(135deg, var(--amber-bright), #ffd060);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.35);
}

.feedback-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
    margin: 20px 0;
}
.community-rating-block {
    text-align: center;
}
.community-rating-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.community-rating {
    font-size: 13px;
    color: var(--text-secondary);
}
.community-rating-star {
    color: var(--amber);
    font-size: 16px;
    margin-right: 4px;
}
.community-rating strong {
    font-family: 'DM Serif Display', serif;
    font-size: 18px;
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════
   SUBSCRIPTION PAGE
   ═══════════════════════════════════════════════════════════════ */
.sub-page-content {
    max-width: 720px;
}

.sub-status-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    backdrop-filter: blur(10px);
}
.sub-status-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.sub-status-icon {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--success);
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: 99px;
    padding: 4px 11px;
}
.sub-status-left h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}
.sub-status-left p {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin: 0;
}
.sub-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 99px;
    padding: 5px 12px;
}
.sub-badge.active {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success);
}
.sub-badge.cancelling {
    background: rgba(255, 184, 48, 0.1);
    border: 1px solid rgba(255, 184, 48, 0.25);
    color: var(--warning);
}

.sub-details-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    padding: 22px;
    margin-bottom: 14px;
    backdrop-filter: blur(10px);
}
.sub-details-card h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 16px;
}
.sub-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}
.sub-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.sub-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}
.btn-manage {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
}

.sub-features-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    padding: 22px;
    backdrop-filter: blur(10px);
}
.sub-features-card h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.sub-features-sub {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.sub-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.sub-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.sub-check {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--success);
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: 99px;
    padding: 3px 8px;
    flex-shrink: 0;
    margin-top: 1px;
}

.sub-upgrade-card {
    background:
        radial-gradient(ellipse 70% 50% at 95% -10%, rgba(245, 166, 35, 0.15), transparent 50%),
        radial-gradient(ellipse 60% 60% at 5% 100%, rgba(99, 102, 241, 0.12), transparent 50%),
        var(--navy-800);
    border: 1px solid var(--border-amber);
    border-radius: var(--r-xl);
    padding: 36px;
    position: relative;
    overflow: hidden;
}
.sub-upgrade-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 166, 35, 0.5), transparent);
}
.sub-upgrade-card h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 28px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}
.sub-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 10px;
}
.sub-price-main {
    font-family: 'DM Serif Display', serif;
    font-size: 48px;
    color: var(--text-amber);
    line-height: 1;
}
.sub-price-suffix {
    font-size: 14px;
    color: var(--text-muted);
}
.sub-price-desc {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 44ch;
}
.sub-features-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 28px;
}
.btn-upgrade {
    width: 100%;
    max-width: 320px;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════
   USERS / DISCOVER PAGE
   ═══════════════════════════════════════════════════════════════ */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.user-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    backdrop-filter: blur(10px);
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}
.user-card:hover {
    border-color: var(--border-amber);
    box-shadow: var(--shadow-glow-amber);
}
.user-card-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1c3370, #0d1e42);
    border: 2px solid var(--border-amber);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--amber);
    overflow: hidden;
}
.user-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.user-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}
.user-card-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════ */
.toast {
    position: fixed;
    top: 24px; /* move to top */
    left: 50%; /* center horizontally */
    transform: translateX(-50%); /* true center */

    background: var(--navy-700);
    border: 1px solid var(--border-mid);
    border-radius: var(--r-md);
    padding: 12px 18px;

    display: flex;
    align-items: center;
    gap: 12px;

    font-size: 13px;
    color: var(--text-primary);

    box-shadow: var(--shadow-elevated);
    z-index: 9999;

    animation: toastIn 0.3s var(--ease);
}
.toast.hidden {
    display: none;
}
#toastClose {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}

/* ─── UTILITIES ──────────────────────────────────────────────── */
.text-muted {
    color: var(--text-muted) !important;
}
.text-sm {
    font-size: 12px;
}
.flex {
    display: flex;
}
.items-center {
    align-items: center;
}
.justify-between {
    justify-content: space-between;
}
.gap-2 {
    gap: 8px;
}
.gap-3 {
    gap: 12px;
}
.gap-4 {
    gap: 16px;
}
.mb-3 {
    margin-bottom: 12px;
}
.mb-6 {
    margin-bottom: 24px;
}
.card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    padding: 20px;
    backdrop-filter: blur(10px);
}
.card-empty {
    text-align: center;
    padding: 40px 24px;
    border-style: dashed;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .browse-story-stage {
        grid-template-columns: 1fr;
    }
    .browse-side-panel {
        flex-direction: row;
    }
    .browse-side-card {
        flex: 1;
    }
    .write-layout {
        grid-template-columns: 1fr;
    }
    .profile-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .browse-hero-panel {
        grid-template-columns: 1fr;
    }
    .browse-featured-card {
        grid-template-columns: 1fr;
    }
    .browse-featured-media {
        min-height: 200px;
        height: 200px;
    }
    .sub-features-grid,
    .sub-features-list {
        grid-template-columns: 1fr;
    }
    .sub-details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .user-dashboard-shell .sidebar {
        display: none;
    }
    .user-dashboard-shell .dashboard-layout main {
        margin-left: 0 !important;
    }
    .user-dashboard-shell .page-content {
        padding: 16px 16px 40px;
    }
}

.user-dashboard-shell .write-editor-form {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-xl);
    padding: 28px;
    backdrop-filter: blur(10px);
}

/* ─── AI FACT CHECK BUTTON (full style) ─── */
.user-dashboard-shell .btn-ai {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    border: none;
    width: auto;
    padding: 9px 18px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all 0.15s var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    justify-content: center;
}
.user-dashboard-shell .btn-ai:hover {
    background: linear-gradient(135deg, #5b52e8, #8b45f5);
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

/* Centre the button group horizontally */
.user-dashboard-shell .write-actions {
    display: flex;
    align-items: center;
    justify-content: center; /* centre horizontally */
    gap: 12px;
    flex-wrap: wrap;
}
