/* ==========================================================================
   Fynch Anti-Slop Interactive Editor Stylesheet (anti-slop-editor.css)
   ========================================================================== */

:root {
    --color-bg-dark: #0e0e0e;
    --color-bg-surface: #141414;
    --color-bg-card: #1c1c1b;
    --color-bg-card-hover: #232322;
    --color-primary: #f59e0b;
    --color-primary-light: #fbbf24;
    --color-primary-glow: rgba(245, 158, 11, 0.25);
    --color-accent-crimson: #ef4444;
    --color-accent-green: #10b981;
    --color-accent-blue: #3b82f6;
    --color-border: #2e2e2d;
    --color-border-subtle: #242423;
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Instrument Serif', Georgia, serif;
}

body {
    background-color: var(--color-bg-dark);
    color: #f3f4f6;
    font-family: var(--font-sans);
    overflow-x: hidden;
}

/* Glassmorphism Panels */
.glass-panel {
    background: rgba(24, 24, 23, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.eyebrow-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 9999px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--color-primary-light);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-title-editor {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    text-wrap: balance;
}

.hero-title-editor span.gradient-text {
    background: linear-gradient(135deg, #ffffff 30%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle-editor {
    font-size: clamp(1rem, 2vw, 1.18rem);
    color: #9ca3af;
    max-width: 760px;
    margin: 0 auto 32px auto;
    line-height: 1.6;
}

/* Channel Presets Switcher */
.channel-presets-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.preset-pill-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-border);
    color: #9ca3af;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.preset-pill-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

.preset-pill-btn.active {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.12);
}

/* Main Studio Grid Layout */
.studio-main-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    max-width: 1240px;
    margin: 0 auto 60px auto;
    align-items: start;
}

@media (max-width: 1024px) {
    .studio-main-grid {
        grid-template-columns: 1fr;
    }
}

/* Editor Workspace Container */
.editor-card-container {
    background: radial-gradient(120% 120% at 50% 0%, rgba(32, 32, 31, 0.95) 0%, rgba(18, 18, 17, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(245, 158, 11, 0.04);
    position: relative;
    overflow: hidden;
}

/* Linear-style Slim 2.5px Top Accent Progress Line */
.editor-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 2.5px;
    width: 0%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.2s ease, width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

.editor-progress-bar.active {
    opacity: 1;
    animation: progressBarShimmer 1.5s infinite linear;
}

@keyframes progressBarShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Audited Source Banner */
.audited-source-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.82rem;
    color: #fbbf24;
    margin-bottom: 12px;
    animation: contentFadeIn 0.2s ease;
}

.audited-source-banner button {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.audited-source-banner button:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* Content Fade-in Animation */
.content-fade-in {
    animation: contentFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes contentFadeIn {
    from {
        opacity: 0.35;
        transform: translateY(3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toolbar Header */
.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 44px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-border-subtle);
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none; /* Hide horizontal scrollbar on small devices */
    gap: 10px;
}

.editor-toolbar::-webkit-scrollbar {
    display: none;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-magic-polish {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000000;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 8px 16px;
    min-width: 145px;
    justify-content: center;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
    box-sizing: border-box;
}

.btn-magic-polish:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
}

.btn-toolbar-ghost {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    color: #d1d5db;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
}

.btn-toolbar-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

#btnCopyText {
    min-width: 155px;
}

#btnUndoText {
    min-width: 80px;
}

/* ==========================================================================
   Overlay Mirror Layout (Textarea + Backdrop Lockstep Synchronization)
   ========================================================================== */

.editor-mirror-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    height: 440px;
    background: rgba(10, 10, 10, 0.65);
    border: 1.5px solid var(--color-border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.editor-mirror-container:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

/* Strict Typography Lockstep on BOTH Elements */
#editorBackdrop,
#rawEditorText {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-family: var(--font-sans);
    font-size: 1.05rem;
    line-height: 1.65;
    letter-spacing: -0.01em;
    padding: 22px;
    margin: 0;
    border: 1.5px solid transparent;
    box-sizing: border-box;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    tab-size: 4;
    outline: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "liga" 0;
}

/* Bottom Layer: Highlight Backdrop */
#editorBackdrop {
    z-index: 1;
    pointer-events: none;
    color: transparent; /* Makes plain text transparent so it doesn't double-render */
    overflow-y: hidden;
    user-select: none;
}

/* Top Layer: Transparent Textarea */
#rawEditorText {
    z-index: 2;
    background: transparent;
    color: #ffffff;
    caret-color: var(--color-primary);
    overflow-y: auto;
    resize: none;
}

/* Custom Sleek Dark Scrollbar for Textarea */
#rawEditorText::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

#rawEditorText::-webkit-scrollbar-track {
    background: transparent;
}

#rawEditorText::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
}

#rawEditorText::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 158, 11, 0.4);
}

/* Highlighted Cliché Mark in Backdrop (Zero-Width Delta: NO horizontal padding/margin) */
mark.slop-pill {
    background: rgba(239, 68, 68, 0.24);
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35), inset 0 -2px 0 #ef4444;
    border-radius: 3px;
    padding: 0 !important;
    margin: 0 !important;
    color: transparent;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

mark.slop-pill.active {
    background: rgba(245, 158, 11, 0.35);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.5), inset 0 -2px 0 #f59e0b;
}

/* URL Ingest Bar (Smooth Collapsible Design) */
.url-ingest-bar {
    display: flex;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-bottom: 0;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    transition: max-height 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, margin-bottom 0.25s ease, padding 0.25s ease;
}

.url-ingest-bar.open {
    max-height: 70px;
    opacity: 1;
    margin-bottom: 16px;
    padding: 10px 16px;
    border-color: var(--color-border);
    background: rgba(0, 0, 0, 0.4);
}

.url-ingest-input {
    flex: 1;
    background: #0a0a0a;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 8px 14px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
}

.url-ingest-input:focus {
    border-color: var(--color-primary);
}

/* Calibration State Bar */
.calibration-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    font-size: 0.84rem;
    color: #9ca3af;
    flex-wrap: wrap;
    gap: 8px;
}

/* Toast Notification */
.editor-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(24, 24, 23, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(245, 158, 11, 0.15);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 9999px;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Cliché Count Pill in Status Bar */
.status-cliche-pill {
    font-size: 0.76rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-cliche-pill.clean {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

/* ==========================================================================
   Desktop Floating Popover Anchoring
   ========================================================================== */

.slop-popover-desktop {
    position: fixed;
    z-index: 9999;
    background: #181817;
    border: 1px solid #3b3b3a;
    border-radius: 14px;
    padding: 16px;
    width: 320px;
    max-width: calc(100vw - 32px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 0 20px rgba(245, 158, 11, 0.08);
    display: none;
    transform: translateY(0);
    animation: popoverFadeIn 0.15s ease-out;
}

@keyframes popoverFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.popover-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    padding: 2px 8px;
    border-radius: 6px;
}

.popover-phrase {
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff;
    margin-bottom: 4px;
}

.popover-reason {
    font-size: 0.8rem;
    color: #9ca3af;
    line-height: 1.4;
    margin-bottom: 12px;
}

.popover-suggestions-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.suggestions-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.suggestion-swap-btn {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    font-weight: 600;
    font-size: 0.86rem;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.suggestion-swap-btn:hover {
    background: var(--color-primary);
    color: #000000;
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

/* ==========================================================================
   Mobile Touch Bottom-Sheet Drawer (< 768px)
   ========================================================================== */

.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: flex-end;
}

.bottom-sheet-drawer {
    width: 100%;
    background: #181817;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px 20px 0 0;
    padding: 24px 20px;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.8);
    animation: slideUpSheet 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUpSheet {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.drawer-grab-handle {
    width: 38px;
    height: 4px;
    background: #4b5563;
    border-radius: 4px;
    margin: 0 auto 16px auto;
}

.mobile-suggestion-btn {
    width: 100%;
    min-height: 48px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mobile-suggestion-btn:active {
    background: var(--color-primary);
    color: #000;
}

/* ==========================================================================
   Live Diagnostic Sidebar & ROI Panel
   ========================================================================== */

.diagnostic-sidebar-card {
    background: radial-gradient(120% 120% at 50% 0%, rgba(28, 28, 27, 0.95) 0%, rgba(18, 18, 17, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Diagnostic Sidebar Score Box (Grade-First Hierarchy) */
.score-summary-box {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px 18px;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.score-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.score-grade-primary {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 4px 0 8px 0;
    letter-spacing: -0.02em;
    transition: color 0.25s ease, text-shadow 0.25s ease, transform 0.2s ease;
}

.score-grade-primary.grade-a { 
    color: #10b981; 
    text-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
}
.score-grade-primary.grade-b { 
    color: #3b82f6; 
    text-shadow: 0 0 25px rgba(59, 130, 246, 0.4);
}
.score-grade-primary.grade-c { 
    color: #f59e0b; 
    text-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
}
.score-grade-primary.grade-d, .score-grade-primary.grade-f { 
    color: #f87171; 
    text-shadow: 0 0 25px rgba(248, 113, 113, 0.4);
}
.score-grade-primary.grade-neutral {
    color: #9ca3af;
    text-shadow: none;
    font-size: 2.2rem;
}
.score-grade-primary.grade-calibrating {
    color: #fbbf24;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
    font-size: 1.8rem;
    padding: 6px 0;
}

.score-subtitle-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #d1d5db;
    margin-bottom: 10px;
    transition: all 0.25s ease;
}

.score-clarity-text {
    font-size: 0.8rem;
    color: #9ca3af;
    line-height: 1.45;
    margin-top: 4px;
}

/* ROI "Editing Tax" Card */
.roi-metric-box {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.roi-metric-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #f87171;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.roi-metric-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.roi-metric-subtext {
    font-size: 0.78rem;
    color: #9ca3af;
    line-height: 1.4;
}

/* Custom Banned Words Builder */
.banned-words-section {
    margin-bottom: 24px;
}

.banned-word-input-row {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.banned-word-input {
    flex: 1;
    background: #0a0a0a;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 8px 12px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
}

.btn-add-word {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--color-border);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.banned-words-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.banned-word-tag {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    font-size: 0.78rem;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.banned-word-tag button {
    background: none;
    border: none;
    color: #f87171;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0;
}

/* Claim Agent Card */
.claim-agent-cta-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.06) 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
}

.btn-claim-agent-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000000;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 14px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.25);
    text-decoration: none;
}

.btn-claim-agent-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

/* ==========================================================================
   Dedicated Agent Provisioning & OTP Modal
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-dialog {
    background: #171716;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    padding: 32px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 50px rgba(245, 158, 11, 0.08);
    position: relative;
    animation: modalFadeUp 0.25s ease-out;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@keyframes modalFadeUp {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    color: #9ca3af;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* Google SSO & Auth Divider Styles */
.btn-google-sso {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    background: #222221;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-google-sso:hover {
    background: #2b2b2a;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    color: #ffffff;
}

.btn-google-sso:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.google-icon-svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 16px 0 18px 0;
    color: #6b7280;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
    padding: 0 12px;
    white-space: nowrap;
}

.oauth-micro-hint {
    font-size: 0.72rem;
    color: #9ca3af;
    text-align: center;
    margin-top: 6px;
    margin-bottom: 4px;
}

/* ==========================================================================
   Below-The-Fold CRO Modules (Workflow, 4 Pillars, Stats, Testimonials, FAQ)
   ========================================================================== */

.section-wrapper {
    padding: 80px 0;
    border-top: 1px solid var(--color-border-subtle);
}

.section-wrapper.darker {
    background: #0d0d0c;
}

.section-wrapper.lighter {
    background: #141413;
}

.section-header-center {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 40px auto;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: #ffffff;
}

.section-subtitle {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* 3-Step Zero-Install Workflow */
.workflow-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 36px;
}

.workflow-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    padding: 30px 24px;
    position: relative;
    transition: all 0.25s ease;
}

.workflow-card:hover {
    border-color: rgba(245, 158, 11, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

.workflow-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: var(--color-primary);
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 0.9rem;
    border-radius: 10px;
    margin-bottom: 16px;
}

/* 4 Pillars Feature Grid */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 36px;
}

.pillar-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pillar-card:hover {
    border-color: rgba(245, 158, 11, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.pillar-num {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 12px;
}

/* Market Reality Stats */
.stats-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 36px;
}

.stat-card-v2 {
    background: radial-gradient(100% 100% at 50% 0%, rgba(36, 36, 35, 0.7) 0%, rgba(20, 20, 19, 0.9) 100%);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 36px 28px;
    text-align: center;
    position: relative;
}

.stat-number-v2 {
    font-size: clamp(3rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff 40%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-number-v2.crimson {
    background: linear-gradient(135deg, #ffffff 40%, #ef4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Wall of Love Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 36px;
}

.testimonial-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 28px;
}

/* FAQ Accordion */
details.faq-item-v2 {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    margin-bottom: 14px;
    overflow: hidden;
    transition: border-color 0.2s;
}

details.faq-item-v2[open] {
    border-color: rgba(245, 158, 11, 0.35);
}

details.faq-item-v2 summary {
    padding: 20px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--color-text-white);
    user-select: none;
}

details.faq-item-v2 summary::-webkit-details-marker {
    display: none;
}

details.faq-item-v2 summary::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--color-primary);
    transition: transform 0.2s ease;
}

details.faq-item-v2[open] summary::after {
    transform: rotate(45deg);
}

.faq-answer-content {
    padding: 0 24px 20px 24px;
    color: var(--color-text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Bottom CTA Card Banner */
.bottom-cta-banner {
    background: radial-gradient(120% 120% at 50% 0%, rgba(36, 36, 35, 0.95) 0%, rgba(18, 18, 17, 0.98) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 24px;
    padding: 48px 32px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(245, 158, 11, 0.06);
    margin: 40px auto 0 auto;
    max-width: 900px;
}

/* ==========================================================================
   4-Stage Reactive URL Crawl Progress Overlay
   ========================================================================== */
.crawl-progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    animation: fadeInProgress 0.2s ease-out;
}

@keyframes fadeInProgress {
    from { opacity: 0; }
    to { opacity: 1; }
}

.crawl-progress-card {
    background: #181817;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 16px;
    padding: 24px 28px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(245, 158, 11, 0.08);
    text-align: left;
}

.crawl-spinner-ring {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(245, 158, 11, 0.2);
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: spinRing 0.8s linear infinite;
    margin-bottom: 12px;
}

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

.crawl-progress-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.crawl-steps-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.crawl-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #6b7280;
    transition: all 0.2s ease;
}

.crawl-step .step-icon {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.95rem;
    width: 16px;
    text-align: center;
}

.crawl-step.active {
    color: #fbbf24;
    font-weight: 600;
}

.crawl-step.active .step-icon {
    color: #f59e0b;
    animation: pulseIcon 1s infinite alternate;
}

@keyframes pulseIcon {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

.crawl-step.done {
    color: #10b981;
}

.crawl-step.done .step-icon {
    color: #10b981;
}

/* ==========================================================================
   Canvas Standalone URL Detection Prompt
   ========================================================================== */
.canvas-url-prompt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 12px;
    animation: slideDownPrompt 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-wrap: wrap;
    gap: 10px;
}

@keyframes slideDownPrompt {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.canvas-url-text {
    font-size: 0.86rem;
    color: #f3f4f6;
    display: flex;
    align-items: center;
    gap: 8px;
}

.canvas-url-text span.detected-url {
    color: #fbbf24;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.btn-crawl-detected {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-crawl-detected:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

/* ==========================================================================
   Quality Score Delta Improvement Pill
   ========================================================================== */
.status-delta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #34d399;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 3px 10px;
    border-radius: 8px;
    animation: popDelta 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popDelta {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   Draft Safeguard Reassurance Banner (Inside Claim Modal)
   ========================================================================== */
.draft-safeguard-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 18px;
    font-size: 0.82rem;
    color: #a7f3d0;
    line-height: 1.4;
}

/* ==========================================================================
   Editor Gate Banner (Word Cap & Daily Audit Limits)
   ========================================================================== */
.editor-gate-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: radial-gradient(ellipse at top left, rgba(245, 158, 11, 0.15) 0%, rgba(20, 20, 19, 0.95) 70%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 16px;
    animation: fadeInGate 0.3s ease-out;
}

@keyframes fadeInGate {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.editor-gate-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gate-banner-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.gate-banner-text {
    font-size: 0.86rem;
    color: #f3f4f6;
    line-height: 1.4;
}

.gate-banner-text strong {
    color: #fbbf24;
}

.btn-gate-action {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s;
    flex-shrink: 0;
}

.btn-gate-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

/* Subtle dimming for text beyond word cap */
.slop-unscanned-overflow {
    opacity: 0.45;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Grade A Verified Certificate & Voice Baseline Card
   ========================================================================== */
.grade-a-cert-card {
    background: radial-gradient(ellipse at top center, rgba(16, 185, 129, 0.15) 0%, rgba(20, 20, 19, 0.95) 75%);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.08);
    animation: fadeInGate 0.3s ease-out;
}

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

.cert-badge {
    font-size: 0.72rem;
    font-weight: 800;
    color: #34d399;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cert-grade {
    background: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.cert-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}

.cert-desc {
    font-size: 0.82rem;
    color: #d1d5db;
    line-height: 1.45;
    margin-bottom: 16px;
}

.cert-actions-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-cert-secondary-link {
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    padding: 4px 8px;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

.btn-cert-secondary-link:hover {
    color: #e5e7eb;
}

.badge-pro-pill {
    font-size: 0.62rem;
    font-weight: 800;
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.4);
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 5px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.mobile-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.btn-mobile-clipboard {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-mobile-clipboard:hover {
    background: rgba(245, 158, 11, 0.22);
    border-color: #fbbf24;
}

/* ==========================================================================
   Mobile-Specific CRO Funnel (< 768px)
   ========================================================================== */
.mobile-agent-card {
    display: none;
    background: radial-gradient(120% 120% at 50% 0%, rgba(32, 32, 31, 0.95) 0%, rgba(18, 18, 17, 0.98) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.mobile-agent-badge {
    font-size: 0.72rem;
    font-weight: 800;
    color: #fbbf24;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.mobile-agent-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}

.mobile-agent-desc {
    font-size: 0.85rem;
    color: #d1d5db;
    line-height: 1.5;
    margin-bottom: 16px;
}

.mobile-sticky-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(14, 14, 14, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(245, 158, 11, 0.3);
    padding: 12px 16px;
    z-index: 9999;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
}

.mobile-sticky-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.mobile-sticky-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.mobile-sticky-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mobile-sticky-text strong {
    font-size: 0.82rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-sticky-text span {
    font-size: 0.72rem;
    color: #fbbf24;
    font-family: var(--font-mono);
}

.btn-mobile-sticky-claim {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Navigation CTA Button */
.nav-cta-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    background-color: var(--color-primary);
    color: #000000;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
    white-space: nowrap;
}

.nav-cta-btn:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

html {
    scroll-padding-top: 80px;
    scroll-padding-bottom: 80px;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    .container {
        padding: 0 16px;
    }
    .nav-cta-btn {
        padding: 7px 12px;
        font-size: 0.78rem;
    }
    nav .nav-container {
        padding: 0 4px;
    }

    /* Hero adjustments: Compact, high-converting above-the-fold layout */
    header.hero {
        padding: 24px 0 14px 0 !important;
    }
    .eyebrow-badge {
        font-size: 0.7rem;
        padding: 4px 10px;
        margin-bottom: 10px;
        letter-spacing: 0.05em;
    }
    .hero-title-editor {
        font-size: clamp(1.65rem, 5.5vw, 2.3rem);
        line-height: 1.2;
        margin-bottom: 8px;
    }
    .hero-subtitle-editor {
        font-size: 0.88rem;
        line-height: 1.5;
        margin: 0 auto 14px auto;
        padding: 0 4px;
    }

    /* Channel Presets: Single Row Touch-Scroll Carousel */
    .channel-presets-nav {
        display: flex;
        justify-content: flex-start;
        gap: 8px;
        margin-bottom: 14px;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 2px 2px 8px 2px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .channel-presets-nav::-webkit-scrollbar {
        display: none;
    }
    .preset-pill-btn {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 0.78rem;
        padding: 7px 13px;
        border-radius: 9999px;
    }

    /* Compact 1-Tap Mobile Utility Strip */
    .mobile-agent-card {
        display: block;
        padding: 12px 14px;
        margin-bottom: 14px;
        border-radius: 14px;
        background: radial-gradient(120% 120% at 50% 0%, rgba(32, 32, 31, 0.95) 0%, rgba(18, 18, 17, 0.98) 100%);
        border: 1px solid rgba(245, 158, 11, 0.3);
    }
    .mobile-agent-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 4px;
    }
    .mobile-agent-badge {
        font-size: 0.68rem;
        font-weight: 800;
        margin-bottom: 0;
    }
    .mobile-agent-subbadge {
        font-size: 0.68rem;
        font-weight: 700;
        color: #10b981;
        background: rgba(16, 185, 129, 0.12);
        padding: 2px 7px;
        border-radius: 9999px;
        border: 1px solid rgba(16, 185, 129, 0.3);
    }
    .mobile-agent-title {
        font-size: 1.05rem;
        margin-bottom: 4px;
    }
    .mobile-agent-desc {
        font-size: 0.78rem;
        line-height: 1.4;
        margin-bottom: 10px;
        color: #d1d5db;
    }
    .mobile-quick-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-top: 8px;
    }
    .btn-mobile-clipboard {
        padding: 9px 12px;
        font-size: 0.78rem;
        min-height: 38px;
        white-space: nowrap;
        justify-content: center;
    }
    .mobile-agent-card .btn-claim-agent-gold {
        padding: 9px 12px;
        font-size: 0.78rem;
        min-height: 38px;
        white-space: nowrap;
        justify-content: center;
    }

    /* Editor Canvas & Card */
    .editor-card-container {
        padding: 14px 12px;
        border-radius: 16px;
        margin-bottom: 16px;
    }
    .editor-mirror-container {
        height: 250px;
        min-height: 200px;
        border-radius: 12px;
    }
    #rawEditorText,
    #editorBackdrop {
        height: 250px;
        min-height: 200px;
        font-size: 16px !important;
        padding: 14px 12px;
        line-height: 1.6;
    }

    /* Action Toolbar: Primary Auto-Polish + Compact Utilities */
    .editor-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-bottom: 10px;
        margin-bottom: 12px;
        overflow-x: visible;
    }
    .toolbar-left {
        width: 100%;
    }
    .btn-magic-polish {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        font-size: 0.92rem;
        box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
    }
    .toolbar-right {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr auto;
        gap: 6px;
        width: 100%;
    }
    .toolbar-right .btn-toolbar-ghost {
        padding: 8px 6px;
        font-size: 0.78rem;
        min-width: 0 !important;
        justify-content: center;
        white-space: nowrap;
    }
    #btnCopyText {
        min-width: 0 !important;
    }
    #btnClearCanvas {
        padding: 8px 10px;
    }

    /* URL Ingest Bar on Mobile */
    .url-ingest-bar.open {
        max-height: 140px;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        gap: 8px;
    }
    .url-ingest-input {
        width: 100%;
        box-sizing: border-box;
        font-size: 16px !important;
    }
    #btnCrawlUrl {
        width: 100%;
        justify-content: center;
    }

    /* Standalone URL prompt */
    .canvas-url-prompt {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
    }
    .btn-crawl-detected {
        width: 100%;
        justify-content: center;
    }

    /* Calibration & Status Bar */
    .calibration-status-bar {
        font-size: 0.75rem;
        gap: 6px;
        margin-top: 10px;
    }
    #statusWordCount {
        font-size: 0.75rem;
    }
    #statusReadabilityPill {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
    .status-cliche-pill {
        font-size: 0.72rem;
        padding: 2px 8px;
    }
    #calibrationNotice {
        font-size: 0.75rem;
    }

    /* Diagnostics Sidebar (Below Editor) */
    .diagnostic-sidebar-card {
        padding: 16px 14px;
        border-radius: 16px;
        margin-top: 16px;
    }
    .score-summary-box {
        padding: 16px 14px;
        border-radius: 12px;
    }
    .score-grade-primary {
        font-size: 2.2rem;
    }
    .roi-metric-box {
        padding: 16px 14px;
        border-radius: 12px;
    }
    .roi-metric-value {
        font-size: 1.05rem;
    }
    .banned-words-section {
        padding: 16px 14px;
        border-radius: 12px;
    }
    .banned-word-input {
        font-size: 16px !important;
    }
    .claim-agent-cta-box {
        padding: 18px 14px;
        border-radius: 14px;
    }
    .claim-agent-cta-box .btn-claim-agent-gold {
        width: 100%;
        justify-content: center;
        padding: 11px 18px;
        font-size: 0.9rem;
    }

    /* Sticky Footer Bar */
    .mobile-sticky-bar {
        display: flex;
        padding: 10px 14px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
    .mobile-sticky-bar.keyboard-active {
        display: none !important;
    }
    .mobile-sticky-text strong {
        font-size: 0.8rem;
        white-space: nowrap;
    }
    .mobile-sticky-text span {
        font-size: 0.68rem;
    }
    .btn-mobile-sticky-claim {
        padding: 8px 12px;
        font-size: 0.78rem;
        white-space: nowrap;
    }
    body {
        padding-bottom: 75px;
    }

    .editor-gate-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    .btn-gate-action {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .mobile-quick-actions {
        grid-template-columns: 1fr;
    }
    .modal-name-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    .modal-dialog {
        padding: 20px 14px;
    }
    #claimOtpInput {
        width: 180px !important;
        font-size: 1.35rem !important;
    }
}

