/* Site-adapted faction accents use dark ink on light surfaces. Gameplay/status colours and image pixels are independent. */
html[data-site-accent] {
  --site-accent-fill: #d9ba6b;
  --site-accent-hover: #e6ce94;
  --site-accent-ink: #7a5f24;
  --site-accent-rgb: 217, 186, 107;
  --site-accent-soft: #f0e8d4;
  --site-accent-dark-soft: #383326;
  --site-accent-on-fill: #141713;
}
html[data-site-accent="caldari"] {
  --site-accent-fill: #6ba9d8;
  --site-accent-hover: #94c2e5;
  --site-accent-ink: #245a86;
  --site-accent-rgb: 107, 169, 216;
  --site-accent-soft: #deebf4;
  --site-accent-dark-soft: #26333e;
}
html[data-site-accent="gallente"] {
  --site-accent-fill: #6fb79f;
  --site-accent-hover: #98cbb9;
  --site-accent-ink: #256652;
  --site-accent-rgb: 111, 183, 159;
  --site-accent-soft: #dfede7;
  --site-accent-dark-soft: #283932;
}
html[data-site-accent="minmatar"] {
  --site-accent-fill: #d7836f;
  --site-accent-hover: #e4a696;
  --site-accent-ink: #8d4030;
  --site-accent-rgb: 215, 131, 111;
  --site-accent-soft: #f2e2dc;
  --site-accent-dark-soft: #3d2e2a;
}
html[data-site-accent] body[data-ui-style="endfield"] {
  --ef-yellow: var(--site-accent-fill);
  --accent: var(--site-accent-ink);
  --accent-soft: var(--site-accent-soft);
  --link: var(--site-accent-ink);
  --hist-active-bg: var(--site-accent-soft);
  --primary-btn-bg: var(--site-accent-fill);
  --primary-btn-bg-hover: var(--site-accent-hover);
  --primary-btn-border: var(--site-accent-ink);
  --primary-btn-text: var(--site-accent-on-fill);
  --ef-selected-bg: var(--site-accent-fill);
  --ef-selected-text: var(--site-accent-on-fill);
  --ef-selected-border: var(--site-accent-fill);
  --ef-selected-shadow: inset 3px 0 0 var(--site-accent-hover);
}
html[data-site-accent] body[data-ui-style="endfield"][data-ef-surface="dark"],
html[data-site-accent] body[data-ui-style="endfield"]:has(#navKills.active),
html[data-site-accent] body[data-ui-style="endfield"] :is(#sidebar, #secondaryNavCard, .ef-dark-surface, .starmap-app, .ship-tree-page, .hacking-simulator, .eveshipfit-upstream-root, .cp-map-shell, .pied-root, .server-dialog.server-account-dialog, .achievements-page, .starmap-tools-panel) {
  --accent: var(--site-accent-fill);
  --accent-soft: var(--site-accent-dark-soft);
  --link: var(--site-accent-hover);
  --hist-active-bg: var(--site-accent-dark-soft);
  --primary-btn-bg: var(--site-accent-fill);
  --primary-btn-bg-hover: var(--site-accent-hover);
  --primary-btn-border: var(--site-accent-fill);
  --primary-btn-text: var(--site-accent-on-fill);
}
html[data-site-accent] body[data-ui-style="endfield"] .server-dialog.server-account-dialog {
  --ef-selected-bg: var(--site-accent-dark-soft);
  --ef-selected-text: #f2f1e8;
  --ef-selected-border: var(--site-accent-fill);
  --ef-selected-shadow: inset 3px 0 0 var(--site-accent-fill);
}
html[data-site-accent] body[data-ui-style="endfield"] input:is([type="checkbox"],[type="radio"]) { accent-color: var(--accent); }
html[data-site-accent] body[data-ui-style="endfield"] :focus-visible { outline-color: var(--accent); }
html[data-site-accent] body[data-ui-style="endfield"] .ef-page-header :focus-visible { outline-color: var(--site-accent-fill); }
html[data-site-accent] body[data-ui-style="endfield"] .ef-feedback-message :is(.ef-feedback-retry,.ef-feedback-close):focus-visible { outline-color: var(--accent); }
html[data-site-accent] body[data-ui-style="endfield"] :is(.btn.primary,.ef-button[data-variant="primary"],.ef-button--primary):hover:not(:disabled) { border-color: var(--primary-btn-border); }
html[data-site-accent] body[data-ui-style="endfield"] .ef-star-border rect { stroke: var(--site-accent-fill); }
html[data-site-accent] body[data-ui-style="endfield"] .ef-check-feedback path { stroke: var(--site-accent-fill); }
html[data-site-accent] body[data-ui-style="endfield"] .ef-segment-indicator { border-color: var(--site-accent-ink); }
html[data-site-accent] body[data-ui-style="endfield"] .server-account-dialog .server-session-title .current { border-color: var(--site-accent-fill); }
html[data-site-accent] body[data-ui-style="endfield"] .server-account-dialog .server-account-nav button.active { background: var(--site-accent-dark-soft); }
html[data-site-accent] body[data-ui-style="endfield"] .community-share,
html[data-site-accent] body[data-ui-style="endfield"] .abyss-tier-item.active .abyss-tier-number { border-color: var(--site-accent-ink); }
html[data-site-accent] body[data-ui-style="endfield"] .fw-switch button[aria-pressed="true"] { box-shadow: inset 0 -2px 0 var(--site-accent-ink); }
html[data-site-accent] body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="01"] #fleetHeaderImport:hover { border-color: var(--site-accent-fill); }

/* The medal art is never tinted; only the surrounding interface and quiet spotlight adapt. */
html[data-site-accent] body[data-ui-style="endfield"] .achievements-page { --ach-accent: var(--site-accent-fill); }
html[data-site-accent] body[data-ui-style="endfield"] .achievements-page .achievement-primary:hover:not(:disabled) { background: var(--site-accent-hover); border-color: var(--site-accent-hover); }
html[data-site-accent] body[data-ui-style="endfield"] .achievement-overall-track > i,
html[data-site-accent] body[data-ui-style="endfield"] .achievement-card-progress > i,
html[data-site-accent] body[data-ui-style="endfield"] .achievement-levels i.is-earned { background: var(--site-accent-fill); }
html[data-site-accent] body[data-ui-style="endfield"] .achievement-levels i.is-earned { box-shadow: 0 0 0 1px rgba(var(--site-accent-rgb), .13); }
html[data-site-accent] body[data-ui-style="endfield"] .achievement-score,
html[data-site-accent] body[data-ui-style="endfield"] .achievement-eyebrow { color: var(--site-accent-hover); }
html[data-site-accent] body[data-ui-style="endfield"] .achievements-page .achievement-categories button[aria-pressed="true"],
html[data-site-accent] body[data-ui-style="endfield"] .achievement-choice:has(input:checked) { background: var(--site-accent-dark-soft); border-color: var(--site-accent-fill); color: var(--site-accent-hover); }
html[data-site-accent] body[data-ui-style="endfield"] .achievements-page .achievement-card[aria-pressed="true"] { background: linear-gradient(135deg, rgba(var(--site-accent-rgb), .09), rgba(var(--site-accent-rgb), .02)); }
html[data-site-accent] body[data-ui-style="endfield"] .achievement-card::before {
  background: linear-gradient(var(--site-accent-fill),var(--site-accent-fill)) left top/12px 1px no-repeat,
    linear-gradient(var(--site-accent-fill),var(--site-accent-fill)) left top/1px 12px no-repeat,
    linear-gradient(var(--site-accent-fill),var(--site-accent-fill)) right top/12px 1px no-repeat,
    linear-gradient(var(--site-accent-fill),var(--site-accent-fill)) right top/1px 12px no-repeat,
    linear-gradient(var(--site-accent-fill),var(--site-accent-fill)) left bottom/12px 1px no-repeat,
    linear-gradient(var(--site-accent-fill),var(--site-accent-fill)) left bottom/1px 12px no-repeat,
    linear-gradient(var(--site-accent-fill),var(--site-accent-fill)) right bottom/12px 1px no-repeat,
    linear-gradient(var(--site-accent-fill),var(--site-accent-fill)) right bottom/1px 12px no-repeat;
}
html[data-site-accent] body[data-ui-style="endfield"] .achievements-page .achievement-card[aria-pressed="true"]:is(:hover,:focus-visible)::before { filter: drop-shadow(0 0 2px rgba(var(--site-accent-rgb), .19)); }
html[data-site-accent] body[data-ui-style="endfield"] .achievements-page .achievement-card::after { background: radial-gradient(circle 140px at var(--achievement-spot-x,50%) var(--achievement-spot-y,50%),rgba(var(--site-accent-rgb), .08) 0%,rgba(var(--site-accent-rgb), .03) 42%,transparent 74%); }

/* Theme map controls only. Map faction, security, route and entity colours keep their meaning. */
html[data-site-accent] body[data-ui-style="endfield"] .sf-root[data-starmap-tools] .starmap-tools-panel :is(button,summary,input,select):focus-visible { outline-color: var(--accent); }
html[data-site-accent] body[data-ui-style="endfield"] .sf-root[data-starmap-tools] .starmap-tools-panel button:is(.active,[aria-selected="true"],[aria-pressed="true"]),
html[data-site-accent] body[data-ui-style="endfield"] .sf-root[data-starmap-tools] .starmap-planner-host .planner-actions .nav-calculate {
  background: var(--site-accent-fill); border-color: var(--site-accent-fill); color: var(--site-accent-on-fill);
}
html[data-site-accent] body[data-ui-style="endfield"] .sf-root[data-starmap-tools] .starmap-tools-panel button:is(.active,[aria-selected="true"],[aria-pressed="true"]):hover:not(:disabled),
html[data-site-accent] body[data-ui-style="endfield"] .sf-root[data-starmap-tools] .starmap-planner-host .planner-actions .nav-calculate:hover:not(:disabled) { background: var(--site-accent-hover); border-color: var(--site-accent-hover); color: var(--site-accent-on-fill); }
html[data-site-accent] body[data-ui-style="endfield"] .pi-planner :is(.pi-workspace-tabs,.pi-reference-views) button.active { border-color: var(--accent); background: var(--accent-soft); }
html[data-site-accent] body[data-ui-style="endfield"] .pi-planner .pi-reference-product.active { border-color: var(--accent); box-shadow: inset 3px 0 var(--accent); background: var(--accent-soft); }
html[data-site-accent] body[data-ui-style="endfield"] .pi-planner [data-pi-reference-action="simulator"],
html[data-site-accent] body[data-ui-style="endfield"] .pi-planner .pi-config-badge { background: var(--site-accent-fill); border-color: var(--accent); color: var(--site-accent-on-fill); }
html[data-site-accent] body[data-ui-style="endfield"] .pi-planner .pi-config-fold { border-color: var(--accent); }
html[data-site-accent] body[data-ui-style="endfield"] .pi-planner .pi-config-fold > summary { background: var(--accent-soft); }
html[data-site-accent] body[data-ui-style="endfield"] .lp-price-choice:hover { background: rgba(var(--site-accent-rgb), .07); }
html[data-site-accent] body[data-ui-style="endfield"] .lp-price-choice.lp-price-selected { background: rgba(var(--site-accent-rgb), .12); box-shadow: inset 0 0 0 1px var(--accent); }
html[data-site-accent] body[data-ui-style="endfield"] .lp-custom-price-input:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

@media (forced-colors: active) {
  html[data-site-accent] body[data-ui-style="endfield"] :focus-visible { outline-color: Highlight; }
  html[data-site-accent] body[data-ui-style="endfield"] .ef-star-border rect,
  html[data-site-accent] body[data-ui-style="endfield"] .ef-check-feedback path { stroke: Highlight; }
  html[data-site-accent] body[data-ui-style="endfield"] .ef-segment-indicator { background: Highlight; border-color: Highlight; }
  html[data-site-accent] body[data-ui-style="endfield"] .achievement-card::after { display: none; }
  html[data-site-accent] body[data-ui-style="endfield"] .achievement-card::before { filter: none; }
}
