/* Each palette has a distinct material and mood. Artwork and map tiles retain their original colors. */
html[data-nexus-tone] { --theme-bg:#161720; --theme-surface:#242431; --theme-raised:#313142; --theme-text:#e9e7f0; --theme-muted:#beb8cc; --theme-line:#696278; --theme-accent:#dec18c; --theme-on-accent:#241e29; --theme-positive:#9fdcb9; --theme-negative:#ffa8b1; --theme-warning:#edd198; }
html[data-nexus-tone=light] { --theme-bg:#f1eee6; --theme-surface:#fffdf6; --theme-raised:#e5dfd0; --theme-text:#37343d; --theme-muted:#605966; --theme-line:#a59c8e; --theme-accent:#775932; --theme-on-accent:#fffaf0; --theme-positive:#286741; --theme-negative:#a62c46; --theme-warning:#7d540a; }
html[data-nexus-game=osrs][data-nexus-variant=alternate] { --theme-bg:#eae1c8; --theme-surface:#f9f1db; --theme-raised:#e0d4b4; --theme-text:#3e3828; --theme-muted:#665a3f; --theme-line:#a59570; --theme-accent:#695126; --theme-on-accent:#fff6de; }
html[data-nexus-game=eve][data-nexus-variant=alternate] { --theme-bg:#e2ecef; --theme-surface:#f5fafb; --theme-raised:#d0e1e6; --theme-text:#193642; --theme-muted:#44616d; --theme-line:#91abb6; --theme-accent:#215f79; --theme-on-accent:#f1fcff; }
html[data-nexus-game=ffxiv][data-nexus-variant=alternate] { --theme-bg:#171826; --theme-surface:#25253a; --theme-raised:#32334b; --theme-text:#eae5f4; --theme-muted:#c1b8d5; --theme-line:#64617f; --theme-accent:#d1b8f0; --theme-on-accent:#262035; }
html[data-nexus-game=palworld][data-nexus-variant=alternate] { --theme-bg:#e5efe2; --theme-surface:#f8fbef; --theme-raised:#d4e5cf; --theme-text:#21453b; --theme-muted:#476754; --theme-line:#91ad91; --theme-accent:#1b6852; --theme-on-accent:#f5ffef; }
html[data-nexus-game=pokemon-go][data-nexus-variant=alternate] { --theme-bg:#122721; --theme-surface:#1b352c; --theme-raised:#2a4537; --theme-text:#e3f0d9; --theme-muted:#b5c9ab; --theme-line:#5f7f60; --theme-accent:#c6dda0; --theme-on-accent:#1e3528; }

.nexus-header .nexus-theme { display:grid; gap:3px; flex-shrink:0; position:relative; margin:0; }
.nexus-header .nexus-theme>span { font:9px/1.2 system-ui; letter-spacing:.1em; text-transform:uppercase; color:#cabbcc; }
.nexus-header .nexus-theme select { font:12px/1.4 system-ui; min-height:32px; max-width:170px; padding:4px 24px 4px 8px; border:1px solid #867457; border-radius:4px; background:#26222d; color:#f3e6c9; cursor:pointer; }
.nexus-header .nexus-theme small { position:absolute; top:100%; right:0; width:220px; background:#292231; border:1px solid #a18860; padding:12px; color:#f3e6c9; z-index:90; }
html[data-nexus-tone] .nexus-header { background:var(--theme-surface); color:var(--theme-text); border-color:var(--theme-line); }
html[data-nexus-tone] .nexus-header :is(.nexus-home,.nexus-current,.nexus-public-links a,.nexus-guest-links a) { color:var(--theme-text); }
html[data-nexus-tone] .nexus-header .nexus-home span,html[data-nexus-tone] .nexus-header .nexus-theme>span { color:var(--theme-muted); }
html[data-nexus-tone] .nexus-header .nexus-home:before { color:var(--theme-accent); border-color:var(--theme-line); }
html[data-nexus-tone] .nexus-header :is(.nexus-theme select,.nexus-account summary,.nexus-guest-links button) { background:var(--theme-raised); color:var(--theme-text); border-color:var(--theme-line); }
html[data-nexus-tone] .nexus-avatar { background:var(--theme-accent); color:var(--theme-on-accent); }
html[data-nexus-tone] .nexus-header .nexus-account-panel { background:var(--theme-surface); color:var(--theme-text); border-color:var(--theme-line); }
html[data-nexus-tone] .nexus-account-panel :is(a,button) { color:var(--theme-text); }
html[data-nexus-tone] .nexus-account-panel :is(a,button):hover,html[data-nexus-tone] .nexus-account-panel a[aria-current=page] { color:var(--theme-text); background:var(--theme-raised); }
html[data-nexus-tone] .nexus-account-panel :is(.nexus-menu-label,small) { color:var(--theme-muted); }
html[data-nexus-tone] :is(.nexus-signout,.nexus-current) { border-color:var(--theme-line); }
html[data-nexus-tone] .experience-dialog { background:linear-gradient(140deg,var(--theme-raised),var(--theme-surface)); color:var(--theme-text); border-color:var(--theme-line); color-scheme:inherit; }
html[data-nexus-tone] .experience-dialog :is(h1,h2,h3,strong,legend,label,p,small,span) { color:inherit; }
html[data-nexus-tone] .experience-dialog :is(a,.welcome-kicker,.environment-mark) { color:var(--theme-accent); }
html[data-nexus-tone] .experience-dialog :is(input,select,textarea,button,fieldset,.environment-choices label,.welcome-principles article,.collection-providers article,.feedback-report,.notebook-confirm) { color:var(--theme-text); background:var(--theme-surface); border-color:var(--theme-line); }
html[data-nexus-tone] .experience-dialog :is(button:hover,.environment-choices label.selected) { background:var(--theme-raised); color:var(--theme-text); }
html[data-nexus-tone] .experience-dialog button.primary { background:var(--theme-accent); color:var(--theme-on-accent); }
html[data-nexus-tone] .experience-dialog :is(.notebook-status,.meta,.muted) { color:var(--theme-muted); }
html[data-nexus-tone] :is(input[type=checkbox],input[type=radio]) { accent-color:var(--theme-accent); }

html[data-nexus-variant=alternate] body,
html[data-nexus-variant=alternate] :is(.page,.osrs-ledger,.ffxiv-atelier,.eve-terminal,.go-app,.palworld) {
  --paper:var(--theme-bg); --bg:var(--theme-bg); --surface:var(--theme-surface); --ink:var(--theme-text); --text:var(--theme-text); --muted:var(--theme-muted); --accent:var(--theme-accent); --amber:var(--theme-accent); --cyan:var(--theme-accent); --line:var(--theme-line);
  background-color:var(--theme-bg); color:var(--theme-text); color-scheme:inherit;
}
html[data-nexus-variant=alternate] body { background:var(--theme-bg); }
html[data-nexus-variant=alternate] :is(.page,.osrs-ledger,.ffxiv-atelier,.eve-terminal,.go-app,.palworld) :is(h1,h2,h3,h4,p,li,dt,dd,legend,label,summary,strong,td,th,small,span) { color:inherit; }
html[data-nexus-variant=alternate] :is(.page,.osrs-ledger,.ffxiv-atelier,.eve-terminal,.go-app,.palworld) :is(a,.eyebrow,.go-eyebrow,.eve-eyebrow) { color:var(--theme-accent); }
html[data-nexus-variant=alternate] :is(.page,.osrs-ledger,.ffxiv-atelier,.eve-terminal,.go-app,.palworld) :is(.meta,.muted,.lede,.source-note,.footnote,.pagination,.source-status,.eve-provenance,.eve-help,.notebook-status,.pal-entry-description) { color:var(--theme-muted); }
html[data-nexus-variant=alternate] :is(.page,.osrs-ledger,.ffxiv-atelier,.eve-terminal,.go-app,.palworld) :is(input,select,textarea,button,a.button) { background:var(--theme-surface); color:var(--theme-text); border-color:var(--theme-line); }
html[data-nexus-variant=alternate] :is(.page,.osrs-ledger,.ffxiv-atelier,.eve-terminal,.go-app,.palworld) :is(button:hover,a.button:hover) { background:var(--theme-raised); color:var(--theme-text); }
html[data-nexus-variant=alternate] :is(.page,.osrs-ledger,.ffxiv-atelier,.eve-terminal,.go-app,.palworld) :is(button.primary,a.button,button.button,button[aria-pressed=true],button[aria-current=page],.nav-item.active,.quality .chosen,.pw-tabs button.active) { background:var(--theme-accent); color:var(--theme-on-accent); border-color:var(--theme-accent); }
html[data-nexus-variant=alternate] :is(.page,.osrs-ledger,.ffxiv-atelier,.eve-terminal,.go-app,.palworld) :is(button.secondary,.button.secondary) { background:var(--theme-raised); color:var(--theme-text); }
html[data-nexus-variant=alternate] :is(.card,.panel,.stat,.stat-card,.detail,.osrs-detail,.eve-card,.go-panel,.pw-panel,.pw-save,.pw-pairs article,.pw-action-list>li,.pw-goal-step,.pal-entry,.pal-recipe,.pal-item-facts,.pal-detail-skills,.pal-selection,.pal-map-sidebar,.pal-map-detail,.pal-map-context,.path-card,.allocation-card,.position-card,.osrs-stats>div,.trade-metrics>div,.eve-metrics>div,.strategy-workspace,.trade-plan-editor,.plan-review,.plan-comparison-grid>div) { background:var(--theme-surface); color:var(--theme-text); border-color:var(--theme-line); box-shadow:none; }
html[data-nexus-variant=alternate] :is(.rail,.osrs-rail,.workspace-switch,.osrs-context,.context,.eve-commandbar,.eve-toolbar,.eve-hub-network,.go-sidebar,.game-nav,.statusbar,.pal-map-toolbar,.pal-map-worlds,.pal-map-controls,.pal-map-attribution) { background:var(--theme-raised); color:var(--theme-text); border-color:var(--theme-line); }
html[data-nexus-variant=alternate] :is(.rail,.osrs-rail,.workspace-switch,.eve-commandbar,.eve-hub-network,.go-sidebar) :is(a,button,.brand,small,strong) { color:var(--theme-text); }
html[data-nexus-variant=alternate] :is(.eve-sector-line,.rail-label,.go-nav-caption,.go-logo small,.osrs-game,.eve-identity small,.eve-operation-label) { color:var(--theme-muted); }
html[data-nexus-variant=alternate] :is(.notice,.callout,.next-step,.trade-evidence,.job-bar,.workspace-guidance,.research-intro,.desk-hero,.hero-ledger,.go-sidebar-note,.go-resume,.go-notice,.go-public-note,.pw-stock,.pw-notice,.pw-tree-node,.pal-home-feature,.pal-guide-cover,.pal-portrait,.pal-detail-portrait,.pal-element,.pal-work-skill,.pal-search,.eve-report details,.eve-notice,.search,.osrs-search,.plan-comparison-grid>div,.shopping-row) { background:var(--theme-raised); color:var(--theme-text); border-color:var(--theme-line); }
html[data-nexus-variant=alternate] :is(.empty,.go-empty,.pal-map-loading) { background:var(--theme-raised); color:var(--theme-muted); border-color:var(--theme-line); }
html[data-nexus-variant=alternate] :is(table,tbody,tr,td) { background:transparent; color:var(--theme-text); border-color:var(--theme-line); }
html[data-nexus-variant=alternate] :is(th,.osrs-table th,.eve-table th,.prose th),html[data-nexus-variant=alternate] tr.selected,html[data-nexus-variant=alternate] tr[tabindex]:hover td { background:var(--theme-raised); color:var(--theme-text); border-color:var(--theme-line); }
html[data-nexus-variant=alternate] .item-name { color:var(--theme-text); }
html[data-nexus-variant=alternate] :is(.item-symbol,.tag,.count,.pw-badge,.pal-collection-tabs button>span,.go-tag,.go-progress) { background:var(--theme-raised); color:var(--theme-text); border-color:var(--theme-line); }
html[data-nexus-variant=alternate] :is(.positive,.profit,.good,.success) { color:var(--theme-positive); }
html[data-nexus-variant=alternate] :is(.negative,.loss,.danger) { color:var(--theme-negative); }
html[data-nexus-variant=alternate] :is(.error,.pw-error,.go-notice.error) { color:var(--theme-negative); background:var(--theme-surface); border-color:var(--theme-negative); }
html[data-nexus-variant=alternate] :is(.warning,.stale) { color:var(--theme-warning); }
html[data-nexus-variant=alternate] .osrs-ledger .eyebrow { color:var(--theme-accent)!important; }
html[data-nexus-variant=alternate] .realm-hero { background:var(--theme-bg); border-color:var(--theme-line); }
html[data-nexus-variant=alternate] .realm-hero:before { background:linear-gradient(90deg,var(--theme-bg) 8%,transparent 180%),var(--realm-art) center/cover; opacity:.28; }
html[data-nexus-variant=alternate] .realm-hero :is(h1,p) { color:var(--theme-text); }
html[data-nexus-game=ffxiv][data-nexus-variant=alternate] .realm-hero:before { opacity:.18; }
html[data-nexus-variant=alternate] .go-section-heading,html[data-nexus-variant=alternate] .go-public-hero { background:linear-gradient(90deg,#143d38,#143d38a8),url('/game-art/pokemon-go-scene.webp') center/cover; color:#eff4de; border-color:#71876a; }
html[data-nexus-variant=alternate] .go-section-heading :is(a,p),html[data-nexus-variant=alternate] .go-public-hero a:not(.button) { color:#d0e5b2; }
html[data-nexus-variant=alternate] :is(.go-event-card,.go-plan-card,.go-budget,.go-checklist,.go-guide-card) { background:var(--theme-surface); color:var(--theme-text); border-color:var(--theme-line); }
html[data-nexus-variant=alternate] :is(.pal-map-sidebar,.pal-map-detail,.pal-map-toolbar,.pal-map-controls,.pal-map-attribution) :is(p,span,small,strong,button,input,select) { color:var(--theme-text); }
html[data-nexus-variant=alternate] :is(.pal-map-sidebar,.pal-map-detail,.pal-map-toolbar,.pal-map-controls) :is(button,input,select) { background:var(--theme-surface); border-color:var(--theme-line); }
html[data-nexus-variant=alternate] .pal-map-surface { background:#173529; }
html[data-nexus-variant=alternate] :is(.nexus-guidance,.nexus-credits,.site-footer) { background:var(--theme-bg); color:var(--theme-muted); border-color:var(--theme-line); }
html[data-nexus-variant=alternate] :is(.realm-portals .realm-portal,.realm-copy) { background:var(--theme-surface); color:var(--theme-text); border-color:var(--theme-line); }
html[data-nexus-variant=alternate] .realm-portals .realm-portal :is(h2 a,p,.portal-link) { color:var(--theme-text); }
html[data-nexus-tone=light] .dialog { background:var(--theme-surface); color:var(--theme-text); border-color:var(--theme-line); }
@media(max-width:800px) {
  .nexus-header .nexus-theme { margin-left:auto; }
  .nexus-header .nexus-account { margin-left:0; }
}
@media(max-width:540px) {
  .nexus-header .nexus-theme { order:5; margin-left:0; grid-template-columns:auto 1fr; align-items:center; flex-basis:100%; padding-top:6px; border-top:1px solid var(--theme-line); }
  .nexus-header .nexus-theme select { max-width:none; width:100%; min-height:40px; }
  .nexus-header .nexus-theme>span { margin-right:12px; }
  .nexus-header .nexus-theme small { position:static; width:auto; grid-column:1/-1; }
  .nexus-header .nexus-account-panel { max-height:calc(100dvh - 160px); }
}

html[data-nexus-variant=alternate] :is(.go-event,.go-saved-card,.go-guide,.go-pass-budget,.go-item,.go-check) { background:var(--theme-surface); color:var(--theme-text); border-color:var(--theme-line); }
html[data-nexus-variant=alternate] .go-event :is(h3,p,small,time,.go-event-date,.go-event-summary) { color:var(--theme-text); }
html[data-nexus-variant=alternate] .go-badge { color:var(--theme-text); background:var(--theme-raised); }
html[data-nexus-variant=alternate] .go-badge.live { color:var(--theme-positive); }
html[data-nexus-variant=alternate] .xiv-masthead { background:linear-gradient(120deg,#353149,#242637); border-color:var(--theme-line); color:var(--theme-text); }
html[data-nexus-variant=alternate] .ffxiv-atelier .xiv-masthead :is(h1,p,small) { color:var(--theme-text); }
html[data-nexus-variant=alternate] .eve-terminal { background:radial-gradient(ellipse at 80% 0,#c2dce577,transparent 60%),var(--theme-bg); }
html[data-nexus-variant=alternate] .osrs-ledger { background:repeating-linear-gradient(0deg,transparent,transparent 27px,#78663c06 28px),var(--theme-bg); }
html[data-nexus-variant=alternate] .go-shell { background:var(--theme-bg); }
html[data-nexus-variant=alternate] .go-sidebar nav button[aria-current=page] { background:var(--theme-accent); color:var(--theme-on-accent); }

html[data-nexus-variant=alternate] .go-app { background:var(--theme-bg); }
html[data-nexus-variant=alternate] .go-panel .go-section-heading { background:transparent; color:var(--theme-text); border:0; }

html[data-nexus-variant=alternate] .eve-help { background:var(--theme-raised); color:var(--theme-text); border-color:var(--theme-line); }
html[data-nexus-variant=alternate] .eve-hub-network button[aria-pressed=true] :is(strong,small,span) { color:var(--theme-on-accent); }

html[data-nexus-variant=alternate] .ffxiv-atelier :is(.breadcrumb,.breadcrumb>span,.brand-mark) { color:var(--theme-muted); border-color:var(--theme-line); }
html[data-nexus-variant=alternate] .palworld :is(.pw-empty,.game-nav a,.game-nav a:first-child) { color:var(--theme-text); }
html[data-nexus-variant=alternate] .palworld .pw-hero { background:linear-gradient(90deg,var(--theme-bg) 25%,transparent 250%),url('/game-art/palworld-scene.webp') center/cover; }
@media(max-width:600px) {
 .nexus-header .nexus-current { width:auto; flex:1; }
 .nexus-header .nexus-public-links { order:3; width:auto; padding:0; }
 .nexus-header .nexus-account summary>span:nth-child(2) { white-space:nowrap; min-width:0; }
}

.login-appearance { position:absolute; top:24px; right:32px; }
.login-appearance .nexus-theme { display:grid; gap:5px; color:var(--theme-muted); font:11px system-ui; }
.login-appearance .nexus-theme select { min-height:40px; padding:8px 12px; color:var(--theme-text); background:var(--theme-surface); border:1px solid var(--theme-line); border-radius:4px 10px 4px 10px; }
html[data-nexus-tone=light] :is(.login,.welcome-screen) { background:var(--theme-bg); color:var(--theme-text); }
html[data-nexus-tone=light] .login .login-story { background:linear-gradient(90deg,var(--theme-bg),transparent 350%),url('/realms/nexus.svg') center/cover; border-color:var(--theme-line); }
html[data-nexus-tone=light] .login :is(h1,h2,p,label,.login-feature,.login-note,.text-button,.eyebrow) { color:var(--theme-text); }
html[data-nexus-tone=light] .login :is(.login-card,input,.brand-mark) { background:var(--theme-surface); color:var(--theme-text); border-color:var(--theme-line); }
html[data-nexus-tone=light] .login .primary { background:var(--theme-accent); color:var(--theme-on-accent); border-color:var(--theme-accent); }
html[data-nexus-tone=light] .welcome-screen :is(h1,p,strong,small) { color:var(--theme-text); }
html[data-nexus-tone=light] .welcome-screen :is(article,.environment-choices label) { background:var(--theme-surface); color:var(--theme-text); border-color:var(--theme-line); }
html[data-nexus-tone=light] .welcome-screen .environment-choices label.selected { background:var(--theme-raised); }
html[data-nexus-tone=light] .welcome-screen button { background:var(--theme-accent); color:var(--theme-on-accent); }
@media(max-width:600px) { .login-appearance { position:static; margin:0 0 24px auto; } }
