@media not all and (min-width: 1200px) {
  .xsg-generator-desktop-only,
  html body main.xsg-generator-seo-page[data-tool="xml-sitemap-generator"] .xsg-generator-desktop-only {
    display: none !important;
  }
}

@media (min-width: 1200px) {
  .xsg-generator-legacy-mobile {
    display: none !important;
  }

  html body.flux-tool-body.flux-tool-seo-tools main#main.xsg-generator-seo-page[data-tool="xml-sitemap-generator"] {
    --c100kb-seo-wide: min(94vw, 1600px);
    --jfmt-toolbar-height: 64px;
    --xsg-control-height: 2.35rem;
    --xsg-text-primary: #0f172a;
    --xsg-text-secondary: #475569;
    --xsg-text-muted: #64748b;
    --xsg-border: #cbd5e1;
    --xsg-radius: 0.5rem;
  }

  body.xsg-generator-editor-active.compress-100kb-ready {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    min-height: 100dvh !important;
    background: #eef2f7 !important;
  }

  body.xsg-generator-editor-active.compress-100kb-ready nav.xsg-generator-legacy-mobile,
  body.xsg-generator-editor-active.compress-100kb-ready section.tool-page-hero.xsg-generator-legacy-mobile,
  body.xsg-generator-editor-active.compress-100kb-ready #tool-workspace,
  body.xsg-generator-editor-active.compress-100kb-ready .tool-workspace-note,
  body.xsg-generator-editor-active.compress-100kb-ready .sitemap-infographic-section {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.xsg-generator-editor-active.compress-100kb-ready #xsg-desktop-shell {
    display: block !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    background: #eef3fb !important;
  }

  body.xsg-generator-editor-active.compress-100kb-ready #xsg-desktop-workspace.jfmt-desktop-intent-panel {
    display: flex !important;
    flex-direction: column !important;
    min-height: calc(100dvh - var(--jfmt-toolbar-height, 64px)) !important;
    padding: 0.45rem 0 0 !important;
    border: 0 !important;
    background: linear-gradient(180deg, #eff9ff, #eef3fb) !important;
  }

  body.xsg-generator-editor-active.compress-100kb-ready #xsg-desktop-shell .c100kb-tool-intent-header {
    display: block !important;
    text-align: center !important;
    margin: 0 auto 0.35rem !important;
    padding: 0.2rem 1.25rem 0.25rem !important;
    max-width: min(94vw, 960px) !important;
  }

  body.xsg-generator-editor-active.compress-100kb-ready #xsg-desktop-shell .c100kb-tool-intent-header h1 {
    margin: 0 !important;
    font-size: clamp(1.35rem, 2.5vw, 2rem) !important;
    font-weight: 800 !important;
    color: var(--xsg-text-primary) !important;
    -webkit-text-fill-color: var(--xsg-text-primary) !important;
    line-height: 1.1 !important;
    opacity: 1 !important;
  }

  body.xsg-generator-editor-active.compress-100kb-ready #xsg-desktop-shell .c100kb-hero-lead {
    margin: 0.3rem auto 0 !important;
    max-width: 42rem !important;
    color: var(--xsg-text-secondary) !important;
    -webkit-text-fill-color: var(--xsg-text-secondary) !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    opacity: 1 !important;
  }

  body.xsg-generator-editor-active.compress-100kb-ready #xsg-desktop-mount {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    width: min(94vw, 1600px) !important;
    max-width: min(94vw, 1600px) !important;
    margin: 0 auto !important;
    padding: 0 1rem 1.25rem !important;
  }

  .c100kb-xsg-generator-editor.xsg-editor-shell {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.65rem !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
  }

  /* Typography overrides — prevent shared SEO CSS from fading titles */
  body.xsg-generator-editor-active.compress-100kb-ready .c100kb-xsg-generator-editor .jfmt-card-title {
    margin: 0 !important;
    font-size: 0.95rem !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    color: var(--xsg-text-primary) !important;
    -webkit-text-fill-color: var(--xsg-text-primary) !important;
    letter-spacing: -0.01em !important;
    opacity: 1 !important;
  }

  body.xsg-generator-editor-active.compress-100kb-ready .c100kb-xsg-generator-editor .xsg-status-panel > .jfmt-card-title {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.15rem !important;
  }

  body.xsg-generator-editor-active.compress-100kb-ready .c100kb-xsg-generator-editor .jfmt-label {
    display: block !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: var(--xsg-text-primary) !important;
    -webkit-text-fill-color: var(--xsg-text-primary) !important;
    margin-bottom: 0.28rem !important;
    opacity: 1 !important;
  }

  body.xsg-generator-editor-active.compress-100kb-ready .c100kb-xsg-generator-editor .jfmt-helper {
    display: block !important;
    font-size: 0.74rem !important;
    color: var(--xsg-text-secondary) !important;
    -webkit-text-fill-color: var(--xsg-text-secondary) !important;
    line-height: 1.45 !important;
    margin-top: 0.22rem !important;
    opacity: 1 !important;
  }

  /* Mode switch */
  .xsg-mode-switch {
    display: inline-flex !important;
    gap: 0.2rem !important;
    padding: 0.18rem !important;
    border-radius: 0.55rem !important;
    background: #e2e8f0 !important;
    border: 1px solid #cbd5e1 !important;
    align-self: flex-start !important;
  }

  .xsg-mode-btn {
    border: 0 !important;
    background: transparent !important;
    color: var(--xsg-text-secondary) !important;
    -webkit-text-fill-color: var(--xsg-text-secondary) !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    padding: 0.42rem 0.8rem !important;
    border-radius: 0.42rem !important;
    cursor: pointer !important;
    line-height: 1.2 !important;
    transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease !important;
  }

  .xsg-mode-btn:hover {
    color: var(--xsg-text-primary) !important;
    -webkit-text-fill-color: var(--xsg-text-primary) !important;
  }

  .xsg-mode-btn:focus-visible {
    outline: 2px solid #2563eb !important;
    outline-offset: 1px !important;
  }

  .xsg-mode-btn.active {
    background: #fff !important;
    color: var(--xsg-text-primary) !important;
    -webkit-text-fill-color: var(--xsg-text-primary) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1) !important;
  }

  /* Sticky action bar */
  .xsg-action-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    padding: 0.7rem 0.95rem !important;
    background: #fff !important;
    border: 1px solid #dbeafe !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.07) !important;
    position: sticky !important;
    top: calc(var(--jfmt-toolbar-height, 64px) + 0.35rem) !important;
    z-index: 6 !important;
  }

  .xsg-action-bar-left {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.35rem !important;
  }

  .xsg-action-status {
    margin: 0 !important;
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
    opacity: 1 !important;
  }

  .xsg-action-progress {
    display: grid !important;
    gap: 0.35rem !important;
    min-width: 0 !important;
    max-width: 420px !important;
  }

  .xsg-action-progress[hidden] {
    display: none !important;
  }

  .xsg-action-progress-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.75rem !important;
  }

  .xsg-action-progress-label {
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    color: #1d4ed8 !important;
    -webkit-text-fill-color: #1d4ed8 !important;
    opacity: 1 !important;
  }

  .xsg-action-progress-pct {
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
    font-variant-numeric: tabular-nums !important;
    opacity: 1 !important;
  }

  .xsg-action-progress-track {
    height: 8px !important;
    background: #e2e8f0 !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    --xsg-progress-width: 0%;
  }

  .xsg-action-progress-track .xsg-progress-fill,
  .xsg-action-progress-track [data-xsg-progress-bar] {
    display: block !important;
    height: 100% !important;
    width: var(--xsg-progress-width, 0%) !important;
    min-width: 0 !important;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%) !important;
    border-radius: inherit !important;
    transition: width 0.35s ease !important;
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.35) !important;
  }

  .xsg-action-bar-right.xsg-header-actions {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.55rem !important;
    flex-wrap: wrap !important;
  }

  .xsg-header-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    min-height: 2.5rem !important;
    height: 2.5rem !important;
    padding: 0 0.95rem !important;
    border-radius: 0.55rem !important;
    border: 1px solid transparent !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease !important;
  }

  .xsg-header-btn span {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
    opacity: 1 !important;
  }

  .xsg-header-btn:focus-visible {
    outline: 2px solid #2563eb !important;
    outline-offset: 2px !important;
  }

  .xsg-header-btn:disabled,
  .xsg-header-btn.is-disabled {
    opacity: 1 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    box-shadow: none !important;
    transform: none !important;
  }

  .xsg-header-btn-crawl {
    background: #0f172a !important;
    border-color: #0f172a !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18) !important;
  }

  .xsg-header-btn-crawl:hover:not(:disabled) {
    background: #1e293b !important;
    border-color: #1e293b !important;
  }

  .xsg-header-btn-crawl.is-crawling,
  .xsg-header-btn-crawl:disabled {
    background: #334155 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc !important;
  }

  .xsg-header-btn-primary {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.22) !important;
  }

  .xsg-header-btn-primary:hover:not(:disabled) {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
  }

  .xsg-header-btn-primary:disabled {
    background: #cbd5e1 !important;
    border-color: #cbd5e1 !important;
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
  }

  .xsg-header-btn-secondary {
    background: #fff !important;
    border-color: #94a3b8 !important;
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
  }

  .xsg-header-btn-secondary:hover:not(:disabled) {
    background: #f8fafc !important;
    border-color: #64748b !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
  }

  .xsg-header-btn-secondary:disabled {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
  }

  .xsg-header-btn.is-copied {
    background: #ecfdf5 !important;
    border-color: #34d399 !important;
    color: #047857 !important;
    -webkit-text-fill-color: #047857 !important;
  }

  /* Layout */
  .xsg-workspace-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 25%) !important;
    gap: 0.85rem !important;
    align-items: start !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
  }

  .xsg-main-flow {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.7rem !important;
    min-width: 0 !important;
  }

  .xsg-step {
    background: #fff !important;
    border: 1px solid #dbeafe !important;
    border-radius: 0.75rem !important;
    padding: 0.8rem 0.9rem !important;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.05) !important;
  }

  .xsg-step-head {
    display: flex !important;
    align-items: center !important;
    gap: 0.55rem !important;
    margin-bottom: 0.55rem !important;
  }

  .xsg-step-badge {
    flex: 0 0 auto !important;
    font-size: 0.62rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #1d4ed8 !important;
    -webkit-text-fill-color: #1d4ed8 !important;
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 999px !important;
    padding: 0.18rem 0.45rem !important;
    line-height: 1.2 !important;
  }

  /* Step 1 crawl depth */
  .xsg-crawl-depth {
    margin-top: 0.45rem !important;
    max-width: 360px !important;
  }

  .xsg-crawl-depth .jfmt-helper {
    margin-top: 0.2rem !important;
  }

  .xsg-crawl-helper {
    margin: 0 !important;
    font-size: 0.78rem !important;
    color: var(--xsg-text-secondary) !important;
    -webkit-text-fill-color: var(--xsg-text-secondary) !important;
  }

  /* Advanced options */
  .xsg-advanced {
    margin-top: 0.55rem !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: var(--xsg-radius) !important;
    background: #fafbfc !important;
    overflow: hidden !important;
  }

  .xsg-advanced summary {
    display: flex !important;
    align-items: center !important;
    gap: 0.55rem !important;
    cursor: pointer !important;
    padding: 0.62rem 0.75rem !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: var(--xsg-text-primary) !important;
    -webkit-text-fill-color: var(--xsg-text-primary) !important;
    list-style: none !important;
    user-select: none !important;
    transition: background 0.12s ease, color 0.12s ease !important;
  }

  .xsg-advanced summary::-webkit-details-marker {
    display: none !important;
  }

  .xsg-advanced summary:hover {
    background: #f1f5f9 !important;
    color: #1d4ed8 !important;
    -webkit-text-fill-color: #1d4ed8 !important;
  }

  .xsg-advanced summary:hover .xsg-advanced-icon {
    border-color: #93c5fd !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
  }

  .xsg-advanced-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 1.35rem !important;
    height: 1.35rem !important;
    flex: 0 0 1.35rem !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0.35rem !important;
    background: #fff !important;
    color: #334155 !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    transition: transform 0.15s ease, background 0.12s ease, border-color 0.12s ease, color 0.12s ease !important;
  }

  .xsg-advanced-icon::before {
    content: "+" !important;
    display: block !important;
    margin-top: -0.05rem !important;
  }

  .xsg-advanced[open] .xsg-advanced-icon::before {
    content: "−" !important;
    margin-top: -0.1rem !important;
  }

  .xsg-advanced[open] summary {
    border-bottom: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
  }

  .xsg-advanced-label {
    flex: 1 1 auto !important;
    line-height: 1.35 !important;
  }

  .xsg-advanced summary:focus-visible {
    outline: none !important;
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.35) !important;
  }

  .xsg-advanced-grid {
    display: grid !important;
    gap: 0.55rem !important;
    padding: 0 0.7rem 0.7rem !important;
  }

  .xsg-advanced-option {
    display: grid !important;
    gap: 0.15rem !important;
  }

  .xsg-advanced-option .jfmt-helper {
    margin-top: 0 !important;
    padding-left: 1.45rem !important;
  }

  .xsg-check {
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    color: var(--xsg-text-primary) !important;
    -webkit-text-fill-color: var(--xsg-text-primary) !important;
    line-height: 1.35 !important;
    cursor: pointer !important;
  }

  .xsg-check input[type="checkbox"] {
    width: 0.95rem !important;
    height: 0.95rem !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
    accent-color: #2563eb !important;
  }

  .xsg-import-bar {
    display: flex !important;
    gap: 0.45rem !important;
    margin-bottom: 0.45rem !important;
  }

  /* Step 2 review */
  .xsg-review-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
    align-items: center !important;
    margin-bottom: 0.45rem !important;
  }

  .xsg-review-toolbar [data-xsg-url-search] {
    flex: 1 1 200px !important;
    min-width: 180px !important;
    max-width: 100% !important;
  }

  .xsg-filter-chips {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.28rem !important;
  }

  .xsg-filter-chip {
    border: 1px solid var(--xsg-border) !important;
    background: #fff !important;
    color: var(--xsg-text-secondary) !important;
    -webkit-text-fill-color: var(--xsg-text-secondary) !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    min-height: 1.75rem !important;
    padding: 0.22rem 0.52rem !important;
    border-radius: 999px !important;
    cursor: pointer !important;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease !important;
  }

  .xsg-filter-chip:hover {
    border-color: #94a3b8 !important;
    color: var(--xsg-text-primary) !important;
    -webkit-text-fill-color: var(--xsg-text-primary) !important;
  }

  .xsg-filter-chip:focus-visible {
    outline: 2px solid #2563eb !important;
    outline-offset: 1px !important;
  }

  .xsg-filter-chip.active {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: var(--xsg-text-primary) !important;
    -webkit-text-fill-color: var(--xsg-text-primary) !important;
  }

  .xsg-url-table-wrap {
    max-height: 260px !important;
    overflow: auto !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: var(--xsg-radius) !important;
  }

  .xsg-url-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 0.76rem !important;
  }

  .xsg-url-table th {
    color: var(--xsg-text-secondary) !important;
    font-weight: 600 !important;
    font-size: 0.72rem !important;
    background: #f8fafc !important;
  }

  .xsg-url-table th,
  .xsg-url-table td {
    padding: 0.4rem 0.5rem !important;
    border-bottom: 1px solid #f1f5f9 !important;
    text-align: left !important;
    vertical-align: top !important;
  }

  .xsg-url-table code {
    word-break: break-all !important;
    font-size: 0.74rem !important;
    color: var(--xsg-text-primary) !important;
  }

  .xsg-badge {
    display: inline-block !important;
    padding: 0.1rem 0.38rem !important;
    border-radius: 999px !important;
    font-size: 0.66rem !important;
    font-weight: 700 !important;
  }

  .xsg-badge-valid { background: #dcfce7; color: #166534; }
  .xsg-badge-invalid { background: #fee2e2; color: #991b1b; }
  .xsg-badge-duplicate { background: #fef3c7; color: #92400e; }
  .xsg-badge-http { background: #e0f2fe; color: #075985; }
  .xsg-badge-404 { background: #fce7f3; color: #9d174d; }

  .xsg-empty {
    text-align: center !important;
    padding: 1rem !important;
    color: var(--xsg-text-secondary) !important;
    -webkit-text-fill-color: var(--xsg-text-secondary) !important;
    background: #f8fafc !important;
    border-radius: var(--xsg-radius) !important;
    border: 1px dashed #cbd5e1 !important;
  }

  .xsg-empty strong {
    display: block !important;
    color: var(--xsg-text-primary) !important;
    -webkit-text-fill-color: var(--xsg-text-primary) !important;
    font-size: 0.86rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.2rem !important;
  }

  .xsg-empty p {
    margin: 0 !important;
    font-size: 0.78rem !important;
    color: var(--xsg-text-secondary) !important;
  }

  .xsg-export-empty {
    text-align: center !important;
    padding: 0.85rem !important;
    margin: 0.45rem 0 !important;
    color: var(--xsg-text-secondary) !important;
    background: #f8fafc !important;
    border: 1px dashed #cbd5e1 !important;
    border-radius: var(--xsg-radius) !important;
  }

  .xsg-export-empty strong {
    display: block !important;
    color: var(--xsg-text-primary) !important;
    font-size: 0.84rem !important;
    margin-bottom: 0.15rem !important;
  }

  .xsg-export-empty p {
    margin: 0 !important;
    font-size: 0.76rem !important;
    color: var(--xsg-text-secondary) !important;
  }

  /* Step 3 options */
  .xsg-options-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.55rem !important;
    align-items: start !important;
  }

  .xsg-options-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.65rem !important;
    margin-top: 0.55rem !important;
    padding-top: 0.55rem !important;
    border-top: 1px solid #f1f5f9 !important;
  }

  .xsg-options-actions .xsg-check {
    margin: 0 !important;
  }

  /* Export tabs */
  .xsg-export-tabs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0 !important;
    margin: 0.45rem 0 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding-bottom: 0 !important;
  }

  .xsg-export-tab {
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    background: transparent !important;
    color: var(--xsg-text-secondary) !important;
    -webkit-text-fill-color: var(--xsg-text-secondary) !important;
    font-size: 0.76rem !important;
    font-weight: 600 !important;
    min-height: 2rem !important;
    padding: 0.35rem 0.65rem !important;
    border-radius: 0 !important;
    margin-bottom: -1px !important;
    cursor: pointer !important;
    transition: color 0.12s ease, border-color 0.12s ease !important;
  }

  .xsg-export-tab:hover {
    color: var(--xsg-text-primary) !important;
    -webkit-text-fill-color: var(--xsg-text-primary) !important;
  }

  .xsg-export-tab:focus-visible {
    outline: 2px solid #2563eb !important;
    outline-offset: -2px !important;
  }

  .xsg-export-tab.active {
    background: transparent !important;
    border-bottom-color: #2563eb !important;
    color: var(--xsg-text-primary) !important;
    -webkit-text-fill-color: var(--xsg-text-primary) !important;
  }

  .xsg-code-output {
    max-height: 200px !important;
    overflow: auto !important;
    margin: 0.45rem 0 0 !important;
    padding: 0.7rem !important;
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border-radius: var(--xsg-radius) !important;
    font-size: 0.72rem !important;
    line-height: 1.45 !important;
    white-space: pre-wrap !important;
    word-break: break-all !important;
  }

  .xsg-export-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.45rem !important;
    margin-top: 0.55rem !important;
  }

  /* Status panel */
  .xsg-status-panel {
    position: sticky !important;
    top: calc(var(--jfmt-toolbar-height, 64px) + 0.5rem) !important;
    background: #fff !important;
    border: 1px solid #dbeafe !important;
    border-radius: 0.75rem !important;
    padding: 0.7rem 0.75rem !important;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.05) !important;
  }

  .xsg-status-pill {
    display: inline-block !important;
    margin: 0.2rem 0 0.5rem !important;
    padding: 0.2rem 0.55rem !important;
    border-radius: 999px !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    background: #f1f5f9 !important;
    color: var(--xsg-text-secondary) !important;
    -webkit-text-fill-color: var(--xsg-text-secondary) !important;
  }

  .xsg-status-pill[data-status="waiting"] {
    background: #f1f5f9 !important;
    color: var(--xsg-text-secondary) !important;
    -webkit-text-fill-color: var(--xsg-text-secondary) !important;
  }

  .xsg-status-pill[data-status="ready"] { background: #dcfce7; color: #166534; -webkit-text-fill-color: #166534; }
  .xsg-status-pill[data-status="review"] { background: #fef3c7; color: #92400e; -webkit-text-fill-color: #92400e; }
  .xsg-status-pill[data-status="limit"] { background: #fee2e2; color: #991b1b; -webkit-text-fill-color: #991b1b; }

  .xsg-metrics {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 0.28rem 0.5rem !important;
    margin: 0 0 0.55rem !important;
    font-size: 0.78rem !important;
  }

  .xsg-metrics > div {
    display: contents !important;
  }

  .xsg-metrics dt {
    color: var(--xsg-text-secondary) !important;
    -webkit-text-fill-color: var(--xsg-text-secondary) !important;
    font-weight: 500 !important;
    margin: 0 !important;
  }

  .xsg-metrics dd {
    margin: 0 !important;
    font-weight: 700 !important;
    color: var(--xsg-text-primary) !important;
    -webkit-text-fill-color: var(--xsg-text-primary) !important;
    text-align: right !important;
  }

  .xsg-capacity {
    margin-bottom: 0.45rem !important;
  }

  .xsg-capacity-label {
    display: flex !important;
    justify-content: space-between !important;
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    color: var(--xsg-text-secondary) !important;
    -webkit-text-fill-color: var(--xsg-text-secondary) !important;
    margin-bottom: 0.22rem !important;
  }

  .xsg-capacity-bar {
    height: 5px !important;
    background: #e2e8f0 !important;
    border-radius: 999px !important;
    overflow: hidden !important;
  }

  .xsg-capacity-bar.is-empty i,
  .xsg-capacity-bar i[style*="width: 0"] {
    background: #e2e8f0 !important;
  }

  .xsg-capacity-bar i {
    display: block !important;
    height: 100% !important;
    width: 0 !important;
    background: #64748b !important;
    border-radius: inherit !important;
    transition: width 0.2s ease !important;
  }

  .xsg-capacity-bar:not(.is-empty) i {
    background: #64748b !important;
  }

  .xsg-capacity .jfmt-helper {
    margin-top: 0.25rem !important;
    font-size: 0.7rem !important;
  }

  .xsg-next-steps {
    margin-top: 0.5rem !important;
    padding-top: 0.5rem !important;
    border-top: 1px solid #f1f5f9 !important;
    font-size: 0.72rem !important;
    color: var(--xsg-text-secondary) !important;
    -webkit-text-fill-color: var(--xsg-text-secondary) !important;
  }

  .xsg-next-steps strong {
    display: block !important;
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    color: var(--xsg-text-primary) !important;
    -webkit-text-fill-color: var(--xsg-text-primary) !important;
    margin-bottom: 0.2rem !important;
  }

  .xsg-next-steps ol {
    margin: 0 !important;
    padding-left: 1rem !important;
    line-height: 1.45 !important;
  }

  .xsg-next-steps li {
    margin-bottom: 0.12rem !important;
  }

  .xsg-crawl-status {
    margin-top: 0.45rem !important;
    padding: 0.5rem 0.65rem !important;
    border-radius: var(--xsg-radius) !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 0.8rem !important;
    color: var(--xsg-text-primary) !important;
  }

  .xsg-crawl-status.is-running {
    border-color: #93c5fd !important;
    background: #eff6ff !important;
  }

  .xsg-crawl-error { color: #b91c1c !important; }

  /* Controls */
  .c100kb-xsg-generator-editor .jfmt-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: var(--xsg-control-height) !important;
    border-radius: var(--xsg-radius) !important;
    padding: 0 0.8rem !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    border: 1px solid transparent !important;
    line-height: 1.2 !important;
    transition: background 0.12s ease, border-color 0.12s ease, opacity 0.12s ease !important;
  }

  .c100kb-xsg-generator-editor .jfmt-btn:disabled {
    opacity: 0.48 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
  }

  .c100kb-xsg-generator-editor .jfmt-btn-primary {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    box-shadow: none !important;
  }

  .c100kb-xsg-generator-editor .jfmt-btn-primary:hover:not(:disabled) {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
  }

  .c100kb-xsg-generator-editor .jfmt-btn-secondary {
    background: #fff !important;
    border-color: var(--xsg-border) !important;
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
  }

  .c100kb-xsg-generator-editor .jfmt-btn-secondary:hover:not(:disabled) {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
  }

  .c100kb-xsg-generator-editor .jfmt-btn-tertiary {
    background: transparent !important;
    border-color: #e2e8f0 !important;
    color: var(--xsg-text-muted) !important;
    -webkit-text-fill-color: var(--xsg-text-muted) !important;
  }

  .c100kb-xsg-generator-editor .jfmt-input,
  .c100kb-xsg-generator-editor .jfmt-select {
    width: 100% !important;
    min-height: var(--xsg-control-height) !important;
    border: 1px solid var(--xsg-border) !important;
    border-radius: var(--xsg-radius) !important;
    padding: 0.4rem 0.6rem !important;
    font-size: 0.82rem !important;
    color: var(--xsg-text-primary) !important;
    -webkit-text-fill-color: var(--xsg-text-primary) !important;
    background: #fff !important;
    line-height: 1.3 !important;
  }

  .c100kb-xsg-generator-editor .jfmt-textarea {
    width: 100% !important;
    border: 1px solid var(--xsg-border) !important;
    border-radius: var(--xsg-radius) !important;
    padding: 0.5rem 0.6rem !important;
    font-size: 0.82rem !important;
    color: var(--xsg-text-primary) !important;
    -webkit-text-fill-color: var(--xsg-text-primary) !important;
    background: #fff !important;
    line-height: 1.45 !important;
    min-height: 6rem !important;
  }

  .c100kb-xsg-generator-editor .jfmt-input:focus,
  .c100kb-xsg-generator-editor .jfmt-select:focus,
  .c100kb-xsg-generator-editor .jfmt-textarea:focus {
    outline: none !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15) !important;
  }

  .c100kb-xsg-generator-editor .jfmt-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    padding-right: 2rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.55rem center !important;
    background-size: 14px 14px !important;
    cursor: pointer !important;
  }

  .xsg-check input:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
  }

  .xsg-check:has(input:disabled) {
    opacity: 0.55 !important;
    cursor: not-allowed !important;
  }

  /* Responsive within desktop */
  @media (max-width: 1400px) {
    .xsg-workspace-layout {
      grid-template-columns: minmax(0, 1fr) minmax(200px, 28%) !important;
    }
  }

  @media (max-width: 1280px) {
    .xsg-options-grid {
      grid-template-columns: 1fr 1fr !important;
    }
  }

  /* Dark mode */
  html[data-theme="dark"] body.xsg-generator-editor-active.compress-100kb-ready,
  body.dark-mode.xsg-generator-editor-active.compress-100kb-ready {
    background: #0b1220 !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-action-bar,
  body.dark-mode.xsg-generator-editor-active .xsg-action-bar {
    background: #111827 !important;
    border-color: #1e293b !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-action-status,
  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-action-progress-pct,
  body.dark-mode.xsg-generator-editor-active .xsg-action-status,
  body.dark-mode.xsg-generator-editor-active .xsg-action-progress-pct {
    color: #e2e8f0 !important;
    -webkit-text-fill-color: #e2e8f0 !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-action-progress-label,
  body.dark-mode.xsg-generator-editor-active .xsg-action-progress-label {
    color: #93c5fd !important;
    -webkit-text-fill-color: #93c5fd !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-header-btn-secondary,
  body.dark-mode.xsg-generator-editor-active .xsg-header-btn-secondary {
    background: #0f172a !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
    -webkit-text-fill-color: #e2e8f0 !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-header-btn-secondary:disabled,
  body.dark-mode.xsg-generator-editor-active .xsg-header-btn-secondary:disabled {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
    border-color: #334155 !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-header-btn-primary:disabled,
  body.dark-mode.xsg-generator-editor-active .xsg-header-btn-primary:disabled {
    background: #334155 !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-action-progress-track,
  body.dark-mode.xsg-generator-editor-active .xsg-action-progress-track {
    background: #334155 !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-step,
  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-status-panel,
  body.dark-mode.xsg-generator-editor-active .xsg-step,
  body.dark-mode.xsg-generator-editor-active .xsg-status-panel {
    background: #111827 !important;
    border-color: #1e293b !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .c100kb-xsg-generator-editor .jfmt-card-title,
  html[data-theme="dark"] body.xsg-generator-editor-active .c100kb-xsg-generator-editor .jfmt-label,
  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-metrics dd,
  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-check,
  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-empty strong,
  body.dark-mode.xsg-generator-editor-active .c100kb-xsg-generator-editor .jfmt-card-title,
  body.dark-mode.xsg-generator-editor-active .c100kb-xsg-generator-editor .jfmt-label,
  body.dark-mode.xsg-generator-editor-active .xsg-metrics dd,
  body.dark-mode.xsg-generator-editor-active .xsg-check,
  body.dark-mode.xsg-generator-editor-active .xsg-empty strong {
    color: #e2e8f0 !important;
    -webkit-text-fill-color: #e2e8f0 !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .c100kb-xsg-generator-editor .jfmt-helper,
  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-metrics dt,
  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-next-steps,
  body.dark-mode.xsg-generator-editor-active .c100kb-xsg-generator-editor .jfmt-helper,
  body.dark-mode.xsg-generator-editor-active .xsg-metrics dt,
  body.dark-mode.xsg-generator-editor-active .xsg-next-steps {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .jfmt-input,
  html[data-theme="dark"] body.xsg-generator-editor-active .jfmt-select,
  html[data-theme="dark"] body.xsg-generator-editor-active .jfmt-textarea,
  body.dark-mode.xsg-generator-editor-active .jfmt-input,
  body.dark-mode.xsg-generator-editor-active .jfmt-select,
  body.dark-mode.xsg-generator-editor-active .jfmt-textarea {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
    -webkit-text-fill-color: #e2e8f0 !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-mode-switch,
  body.dark-mode.xsg-generator-editor-active .xsg-mode-switch {
    background: #1e293b !important;
    border-color: #334155 !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-mode-btn.active,
  body.dark-mode.xsg-generator-editor-active .xsg-mode-btn.active {
    background: #0f172a !important;
    color: #f1f5f9 !important;
    -webkit-text-fill-color: #f1f5f9 !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-filter-chip,
  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-export-tab,
  body.dark-mode.xsg-generator-editor-active .xsg-filter-chip,
  body.dark-mode.xsg-generator-editor-active .xsg-export-tab {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-filter-chip.active,
  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-export-tab.active,
  body.dark-mode.xsg-generator-editor-active .xsg-filter-chip.active,
  body.dark-mode.xsg-generator-editor-active .xsg-export-tab.active {
    color: #e2e8f0 !important;
    -webkit-text-fill-color: #e2e8f0 !important;
    border-color: #64748b !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-advanced,
  body.dark-mode.xsg-generator-editor-active .xsg-advanced {
    background: #0f172a !important;
    border-color: #334155 !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-advanced summary,
  body.dark-mode.xsg-generator-editor-active .xsg-advanced summary {
    color: #e2e8f0 !important;
    -webkit-text-fill-color: #e2e8f0 !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-advanced summary:hover,
  body.dark-mode.xsg-generator-editor-active .xsg-advanced summary:hover {
    background: #1e293b !important;
    color: #93c5fd !important;
    -webkit-text-fill-color: #93c5fd !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-advanced-icon,
  body.dark-mode.xsg-generator-editor-active .xsg-advanced-icon {
    background: #111827 !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-advanced[open] summary,
  body.dark-mode.xsg-generator-editor-active .xsg-advanced[open] summary {
    background: #111827 !important;
    border-bottom-color: #334155 !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-capacity-bar,
  body.dark-mode.xsg-generator-editor-active .xsg-capacity-bar {
    background: #334155 !important;
  }

  html[data-theme="dark"] body.xsg-generator-editor-active .xsg-capacity-bar i,
  body.dark-mode.xsg-generator-editor-active .xsg-capacity-bar i {
    background: #64748b !important;
  }
}
