/* wiajournal.com — site theme: DARK overlay (2026-10-29, family56 bundle D).
   ORIGINAL look = LIGHT, tokens NONE: body white / #333, header #2c3e50 (dark navy, fixed 70px), hero + CTA purple
   gradient #667eea→#764ba2, footer #1a202c. CSS = large inline <style> baked into all 24 built pages from
   backend/pages-src/shell/head.html (header, in-page language modal, hero, features, integration, cta, footer,
   back-to-top) + /static/css/wj-site.css (220 lines: .wj-* page/app components — auth, my, editor, submit, papers)
   + /static/css/wj-tw.css (Tailwind subset, submit/ papers/ verify/ only). Live files NOT changed.
   Load this file right before </head> — in shell/head.html's tail (after wj-site.css?v=) AND in the 24 live pages
   (survey §2: live is ahead of the build; do not rebuild). The engine sets <html data-theme="light|dark"> before first
   paint. Every rule is scoped to html[data-theme="dark"] → 0 px change when nothing is saved. color-scheme: engine.

   Pages sampled: index · submit · auth (+invite/verify/reset) · my/papers (+reviews) · editor; the other content
   pages (about board browse … support) are .wj-page-hero + .wj-section + .wj-card/.wj-table/.wj-faq, all covered.

   Design: the navy header (#2c3e50) and purple hero/CTA/buttons already sit on the dark side — they are kept (the
   header gets one step darker so it does not look lighter than the page). White/#f8f9fb surfaces go dark; purple
   text (#5a4bd1 / #667eea) becomes lavender for contrast.

   Dark palette (ratios against page #0b0d12 / card #14161f):
   ┌──────────────────┬──────────┬──────────────────────────────────────────────────────────────────┐
   │ page bg          │ #0b0d12  │ body, .integration, .wj-main                                      │
   │ band             │ #10121a  │ .features, .recent-papers, .wj-section.alt, table heads           │
   │ card             │ #14161f  │ feature cards, .wj-card/.wj-paper/.wj-stat/.wj-auth/.wj-table …   │
   │ card-2           │ #181b27  │ .alt cards, inline boxes, code, tags                              │
   │ header           │ #161e2b  │ was #2c3e50 (nav text rgba white .9 = 13:1)                        │
   │ text             │ #e9ecf2  │ 16.4:1 · 15.2:1   (was #333 / #2c3e50 headings)                   │
   │ text-2           │ #b8c0d0  │ 10.6:1 · 9.9:1    (was #444 / #666 / #4a4f6a)                     │
   │ text-muted       │ #a3abbd  │  8.4:1 · 7.8:1    (was #6b6f85 / #6b7280)                         │
   │ line             │ #2a2d3d  │ hairlines (was #eceef5 / #e3e5f0 / #eee)                          │
   │ control border   │ #6b7389  │ inputs, selects, tabs, radios: 4.1:1 page · 3.8:1 card            │
   │ purple as text   │ #a5b4fc  │ 10.3:1 · 9.5:1    (was #5a4bd1 / #667eea 3.9:1 on dark)           │
   │ purple fills     │ #667eea→#764ba2 kept (white text, buttons/badges/hero/cta)                    │
   │ status chips     │ dark tints with light text ≥ 7:1 (see .wj-status / .wj-msg)                   │
   └──────────────────┴──────────┴──────────────────────────────────────────────────────────────────┘
   !important: 8 declarations, each for an inline style="" or a source !important, with the reason beside it:
   #userDropdown (inline white card + shadow) ×2 · its items (inline color:#333 + border) ×2 · .recent-papers (inline
   background:#f8f9fa) ×1 · its "⏳" placeholder (inline color:#666) ×1 · "WIAsis" caption (inline color:#667eea) ×1 ·
   .wj-btn.secondary (source color:#5a4bd1 !important) ×1. Tailwind utilities (rgb()/var) need only specificity. */

/* ===== page ===== */
html[data-theme="dark"] body { background: #0b0d12; color: #e9ecf2; }
html[data-theme="dark"] ::selection { background: rgba(165, 180, 252, .3); }

/* ===== header (fixed, #2c3e50) ===== */
html[data-theme="dark"] header { background: #161e2b; box-shadow: 0 1px 0 #2a2d3d, 0 2px 8px rgba(0, 0, 0, .5); }
html[data-theme="dark"] header nav a { color: rgba(255, 255, 255, .9); }
html[data-theme="dark"] header nav a:hover,
html[data-theme="dark"] header nav a.active { color: #fff; background: rgba(255, 255, 255, .12); }
html[data-theme="dark"] header nav a:focus-visible,
html[data-theme="dark"] .language-btn:focus-visible,
html[data-theme="dark"] .mobile-menu-btn:focus-visible,
html[data-theme="dark"] #loginBtn:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; }
html[data-theme="dark"] .language-btn { background: rgba(255, 255, 255, .08); border-color: #6b7389; }   /* 3.6:1 on header */
html[data-theme="dark"] .language-btn:hover { background: rgba(255, 255, 255, .16); border-color: #a5b4fc; }
html[data-theme="dark"] .mobile-nav { background: #14161f; border-top: 1px solid #2a2d3d; box-shadow: 0 12px 24px rgba(0, 0, 0, .6); }
html[data-theme="dark"] .mobile-nav a:hover { background: rgba(255, 255, 255, .08); }
/* #loginBtn inline green #4CAF50 + white (3.1:1) — identical in both themes, left as the site has it */
/* account dropdown (#userDropdown, inline white card with inline #333 items) — !important required for inline styles */
html[data-theme="dark"] #userDropdown { background: #14161f !important; border: 1px solid #2a2d3d; box-shadow: 0 8px 24px rgba(0, 0, 0, .6) !important; }
html[data-theme="dark"] #userDropdown a[style*="color: #333"] { color: #e9ecf2 !important; border-bottom-color: #2a2d3d !important; }
html[data-theme="dark"] #userDropdown a:hover { background: rgba(255, 255, 255, .06); }
/* logout item inline #e74c3c = 4.6:1 on #14161f — passes, left alone */

/* ===== in-page language modal (markup baked by build.py, opened by wj-site.js) ===== */
html[data-theme="dark"] .language-modal { background: rgba(0, 0, 0, .85); }
html[data-theme="dark"] .modal-content { background: #14161f; border: 1px solid #2a2d3d; box-shadow: 0 24px 60px rgba(0, 0, 0, .7); }
/* .modal-header keeps the purple gradient + white text (large title) */
html[data-theme="dark"] .continent-title { color: #e9ecf2; border-bottom-color: #a5b4fc; }
html[data-theme="dark"] .language-item { background: #0b0d12; border-color: #6b7389; color: #e9ecf2; }
html[data-theme="dark"] .language-item:hover { background: #4f5fd8; border-color: #8c9cff; color: #fff; box-shadow: 0 5px 15px rgba(0, 0, 0, .5); }
html[data-theme="dark"] .language-item.active { background: #6b3fa0; border-color: #a78bfa; color: #fff; }
html[data-theme="dark"] .language-item:focus-visible,
html[data-theme="dark"] .modal-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ===== index: hero (purple, kept) · features · recent papers · integration · cta (purple, kept) ===== */
html[data-theme="dark"] .hero { box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .08); }
html[data-theme="dark"] .btn-primary:focus-visible,
html[data-theme="dark"] .btn-secondary:focus-visible,
html[data-theme="dark"] .wj-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
html[data-theme="dark"] .features { background: #10121a; border-top: 1px solid #2a2d3d; border-bottom: 1px solid #2a2d3d; }
html[data-theme="dark"] .section-title { color: #e9ecf2; }
html[data-theme="dark"] .feature-card { background: #14161f; border: 1px solid #2a2d3d; box-shadow: 0 5px 20px rgba(0, 0, 0, .45); }
html[data-theme="dark"] .feature-card:hover { border-color: #3a3f55; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
html[data-theme="dark"] .feature-card h3 { color: #e9ecf2; }
html[data-theme="dark"] .feature-card p { color: #b8c0d0; }
/* recent papers: <section class="recent-papers" style="padding:4rem 0;background:#f8f9fa"> — inline → !important */
html[data-theme="dark"] .recent-papers { background: #10121a !important; border-bottom: 1px solid #2a2d3d; }
html[data-theme="dark"] .recent-papers div[style*="color: #666"] { color: #a3abbd !important; }   /* "⏳ loading" placeholder, inline */
html[data-theme="dark"] .recent-papers h2 { color: #e9ecf2; }
html[data-theme="dark"] .integration { background: #0b0d12; }
html[data-theme="dark"] .integration-text h2,
html[data-theme="dark"] .step-content h3 { color: #e9ecf2; }
html[data-theme="dark"] .integration-text p,
html[data-theme="dark"] .step-content p { color: #b8c0d0; }
html[data-theme="dark"] .integration-image img { box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
/* .wiasis-logo-container (inline purple gradient, white text) — already a dark saturated tile, kept */
html[data-theme="dark"] .cta { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
html[data-theme="dark"] p[style*="color: #667eea"] { color: #a5b4fc !important; }   /* "WIAsis" italic caption, inline #667eea = 3.9:1 */

/* ===== footer (#1a202c navy — kept, edges + accent) ===== */
html[data-theme="dark"] footer { background: #0d1117; border-top: 1px solid #2a2d3d; }
html[data-theme="dark"] .footer-section h3 { color: #a5b4fc; }
html[data-theme="dark"] .footer-section a,
html[data-theme="dark"] .footer-section p,
html[data-theme="dark"] .footer-bottom { color: #b8c0d0; }
html[data-theme="dark"] .footer-section a:hover { color: #fff; }
html[data-theme="dark"] .footer-section a:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; }
html[data-theme="dark"] .footer-bottom { border-top-color: #2a2d3d; }
/* a11y caption style="font-size:10px;color:#94a3b8" — 7.0:1 on #0d1117, left alone */
html[data-theme="dark"] .back-to-top { box-shadow: 0 5px 15px rgba(0, 0, 0, .6); }

/* ===== wj-site.css — content pages ===== */
html[data-theme="dark"] .wj-main { background: #0b0d12; }
html[data-theme="dark"] .wj-page-hero { box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .08); }   /* purple gradient kept */
html[data-theme="dark"] .wj-section.alt { background: #10121a; border-top: 1px solid #2a2d3d; border-bottom: 1px solid #2a2d3d; }
html[data-theme="dark"] .wj-section h2,
html[data-theme="dark"] .wj-section h3,
html[data-theme="dark"] .wj-steps > li strong,
html[data-theme="dark"] .wj-empty strong,
html[data-theme="dark"] .wj-stat-value,
html[data-theme="dark"] .wj-field > span,
html[data-theme="dark"] .wj-radios legend,
html[data-theme="dark"] .wj-inline h4,
html[data-theme="dark"] .wj-paper h4,
html[data-theme="dark"] .wj-faq summary { color: #e9ecf2; }
html[data-theme="dark"] .wj-section p,
html[data-theme="dark"] .wj-section li,
html[data-theme="dark"] .wj-paper .wj-abstract,
html[data-theme="dark"] .wj-cite { color: #b8c0d0; }
html[data-theme="dark"] .wj-section a,
html[data-theme="dark"] .wj-link,
html[data-theme="dark"] .wj-paper h3 a:hover { color: #a5b4fc; }
html[data-theme="dark"] .wj-link.wj-err { color: #fca5a5; }
html[data-theme="dark"] .wj-section a:focus-visible,
html[data-theme="dark"] .wj-link:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; border-radius: 3px; }
html[data-theme="dark"] .wj-section code { background: #181b27; color: #c7d2fe; }
html[data-theme="dark"] .wj-card,
html[data-theme="dark"] .wj-paper,
html[data-theme="dark"] .wj-stat,
html[data-theme="dark"] .wj-auth,
html[data-theme="dark"] .wj-cite,
html[data-theme="dark"] .wj-steps > li,
html[data-theme="dark"] .wj-faq details { background: #14161f; border-color: #2a2d3d; box-shadow: 0 4px 18px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .wj-section.alt .wj-card { background: #181b27; }
html[data-theme="dark"] .wj-paper h3 a { color: #e9ecf2; }
html[data-theme="dark"] .wj-paper .wj-meta,
html[data-theme="dark"] .wj-stat-label,
html[data-theme="dark"] .wj-hint,
html[data-theme="dark"] .wj-empty { color: #a3abbd; }
html[data-theme="dark"] .wj-empty,
html[data-theme="dark"] .wj-inline { background: #10121a; border-color: #4b5168; }   /* dashed boxes */
html[data-theme="dark"] .wj-pre { background: #10121a; border-color: #2a2d3d; color: #e9ecf2; }
html[data-theme="dark"] .wj-review { border-top-color: #2a2d3d; }
html[data-theme="dark"] .wj-files li { border-bottom-color: #2a2d3d; }
html[data-theme="dark"] .wj-note { background: #1a1733; border-color: #a78bfa; color: #e9ecf2; }
html[data-theme="dark"] .wj-note.warn { background: #2a2110; border-color: #d9a441; color: #fbd38d; }   /* 10.2:1 */
html[data-theme="dark"] .wj-btn.secondary { background: #14161f; color: #a5b4fc !important; border-color: #6b7389; }   /* source: color:#5a4bd1 !important */
html[data-theme="dark"] .wj-btn.secondary:hover { border-color: #a5b4fc; }
html[data-theme="dark"] .wj-tag { background: rgba(165, 180, 252, .14); color: #c7d2fe; }
html[data-theme="dark"] .wj-badge { background: #0f2e22; color: #6ee7b7; }
/* tables */
html[data-theme="dark"] .wj-table { background: #14161f; color: #e9ecf2; }
html[data-theme="dark"] .wj-table th { background: #10121a; color: #e9ecf2; }
html[data-theme="dark"] .wj-table th,
html[data-theme="dark"] .wj-table td { border-bottom-color: #2a2d3d; }
html[data-theme="dark"] .wj-table-wrap { border: 1px solid #2a2d3d; border-radius: 10px; }
/* faq */
html[data-theme="dark"] .wj-faq summary::after { color: #c4b5fd; }
html[data-theme="dark"] .wj-faq summary:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; }
/* inputs — toolbar (editor), fields (auth/submit forms), radios */
html[data-theme="dark"] .wj-toolbar input,
html[data-theme="dark"] .wj-toolbar select,
html[data-theme="dark"] .wj-field input,
html[data-theme="dark"] .wj-field select,
html[data-theme="dark"] .wj-field textarea { background: #0b0d12; color: #e9ecf2; border-color: #6b7389; }
html[data-theme="dark"] .wj-toolbar input::placeholder,
html[data-theme="dark"] .wj-field input::placeholder,
html[data-theme="dark"] .wj-field textarea::placeholder { color: #a3abbd; }
html[data-theme="dark"] .wj-toolbar input:focus,
html[data-theme="dark"] .wj-toolbar select:focus,
html[data-theme="dark"] .wj-field input:focus,
html[data-theme="dark"] .wj-field select:focus,
html[data-theme="dark"] .wj-field textarea:focus { border-color: #a5b4fc; box-shadow: 0 0 0 3px rgba(165, 180, 252, .22); }
html[data-theme="dark"] .wj-field select option,
html[data-theme="dark"] .wj-toolbar select option { background: #14161f; color: #e9ecf2; }
html[data-theme="dark"] .wj-radios label { background: #0b0d12; border-color: #6b7389; color: #e9ecf2; }
html[data-theme="dark"] .wj-radios label:hover { border-color: #a5b4fc; }
/* tabs (auth login/register, editor lists) */
html[data-theme="dark"] .wj-tab { background: #14161f; color: #b8c0d0; border-color: #6b7389; }
html[data-theme="dark"] .wj-tab:hover { border-color: #a5b4fc; color: #e9ecf2; }
html[data-theme="dark"] .wj-tab:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; }
/* .wj-tab.active keeps the purple gradient + white */
/* messages */
html[data-theme="dark"] .wj-msg.ok { background: #0f2e22; color: #6ee7b7; border-color: #1f5a3f; }
html[data-theme="dark"] .wj-msg.err { background: #3a1517; color: #fca5a5; border-color: #7a2a2e; }
html[data-theme="dark"] .wj-msg.info { background: #1a1733; color: #ddd6fe; border-color: #4c3f8f; }
/* status chips (my/papers, editor) */
html[data-theme="dark"] .wj-status { background: #1f2231; color: #d6dbe6; }
html[data-theme="dark"] .wj-status.st-submitted,
html[data-theme="dark"] .wj-status.st-assigned { background: #172554; color: #bfdbfe; }
html[data-theme="dark"] .wj-status.st-under_review,
html[data-theme="dark"] .wj-status.st-in_progress { background: #2a2110; color: #fcd34d; }
html[data-theme="dark"] .wj-status.st-revision { background: #3a1517; color: #fca5a5; }
html[data-theme="dark"] .wj-status.st-accepted,
html[data-theme="dark"] .wj-status.st-completed { background: #0f2e22; color: #6ee7b7; }
html[data-theme="dark"] .wj-status.st-rejected,
html[data-theme="dark"] .wj-status.st-declined { background: #1f2231; color: #a3abbd; }
/* .wj-status.st-published keeps #5a4bd1 fill + white (6.0:1) */

/* ===== submit/ (Tailwind subset wj-tw.css + .gradient-bg hero) ===== */
/* Tailwind colours are rgb(... / var(--tw-bg-opacity)); a plain declaration at higher specificity replaces them.
   .bg-white.bg-opacity-20 (translucent circles on the purple hero) is excluded so the 20 % white stays. */
html[data-theme="dark"] .bg-white:not(.bg-opacity-20) { background-color: #14161f; }
html[data-theme="dark"] .bg-gray-50 { background-color: #10121a; }
html[data-theme="dark"] .bg-gray-200 { background-color: #2a2d3d; }
html[data-theme="dark"] .bg-blue-50 { background-color: #141c33; }
html[data-theme="dark"] .bg-purple-50 { background-color: #1a1733; }
html[data-theme="dark"] .text-gray-900,
html[data-theme="dark"] .text-gray-800 { color: #e9ecf2; }
html[data-theme="dark"] .text-gray-700,
html[data-theme="dark"] .text-gray-600 { color: #b8c0d0; }
html[data-theme="dark"] .text-gray-500,
html[data-theme="dark"] .text-gray-400 { color: #a3abbd; }
html[data-theme="dark"] .text-purple-600,
html[data-theme="dark"] .text-purple-700,
html[data-theme="dark"] .text-purple-800,
html[data-theme="dark"] .text-purple-900 { color: #c4b5fd; }
html[data-theme="dark"] .text-blue-600,
html[data-theme="dark"] .text-blue-800,
html[data-theme="dark"] .text-blue-900 { color: #93c5fd; }
html[data-theme="dark"] .text-green-600 { color: #6ee7b7; }
html[data-theme="dark"] .border-gray-300 { border-color: #6b7389; }
html[data-theme="dark"] .border-purple-200 { border-color: #4c3f8f; }
html[data-theme="dark"] .border-blue-200 { border-color: #1e3a8a; }
html[data-theme="dark"] .shadow-lg,
html[data-theme="dark"] .shadow-xl,
html[data-theme="dark"] .shadow-md { --tw-shadow-color: rgba(0, 0, 0, .6); --tw-shadow: 0 10px 25px rgba(0, 0, 0, .6); box-shadow: 0 10px 25px rgba(0, 0, 0, .6); }
html[data-theme="dark"] input.border-gray-300,
html[data-theme="dark"] select.border-gray-300,
html[data-theme="dark"] textarea.border-gray-300 { background-color: #0b0d12; color: #e9ecf2; }
html[data-theme="dark"] input.border-gray-300::placeholder,
html[data-theme="dark"] textarea.border-gray-300::placeholder { color: #a3abbd; }
html[data-theme="dark"] input.border-gray-300:focus,
html[data-theme="dark"] select.border-gray-300:focus,
html[data-theme="dark"] textarea.border-gray-300:focus { border-color: #a5b4fc; }
html[data-theme="dark"] .drag-area { border-color: #6b7389; }
html[data-theme="dark"] .drag-area.dragover { border-color: #a78bfa; background-color: #1a1733; }
/* .gradient-bg hero, .bg-purple-600/700 buttons, .bg-green-600/700, .bg-gray-500/600 — saturated fills with white text, kept */
