/* EVE industrial visual system. Scoped to the opt-in shell; business DOM remains intact. */
body[data-ui-style="endfield"] {
  --ef-ink: #17191a;
  --ef-carbon: #161819;
  --ef-paper: #eeeDE8;
  --ef-yellow: #f4ef20;
  --ef-selected-bg: var(--ef-yellow);
  --ef-selected-text: #191b13;
  --ef-selected-border: var(--ef-yellow);
  --ef-selected-shadow: inset 3px 0 0 #fff9b5;
  --ef-space-1: 4px;
  --ef-space-2: 8px;
  --ef-space-3: 12px;
  --ef-space-4: 16px;
  --ef-space-5: 24px;
  --ef-space-6: 32px;
  --ef-radius: 3px;
  --ef-hero-height: clamp(168px, 16vw, 232px);
  --ef-content-pad: clamp(16px, 2vw, 30px);
  --ef-control-height: 38px;
  --ef-card-art: url('/assets/eve-art/combat.webp?v=f9e868574a95');
  --bg-page: #eeede8;
  --sidebar-bg: #161819;
  --panel-bg: #f7f6f2;
  --panel-bg-alt: #e8e7e1;
  --subrow-bg: #efeee8;
  --card-bg: #f7f6f2;
  --control-bg: #f9f8f4;
  --control-bg-hover: #e5e4dd;
  --btn-bg: #222425;
  --btn-bg-hover: #363839;
  --pill-bg: #e5e4de;
  --hist-active-bg: #f3f0c9;
  --input-bg: #fbfaf6;
  --text-primary: #242628;
  --text-strong: #161819;
  --text-secondary: #5b6061;
  --text-muted: #686d6e;
  --btn-text: #f6f5ef;
  --mini-btn-text: #f6f5ef;
  --th-text: #4b5152;
  --th-hover: #161819;
  --raw-text: #505657;
  --modal-h4: #34393a;
  --border: #c6c8c2;
  --border-strong: #9ea39e;
  --border-subtle: #d8dad3;
  --border-totals: #818781;
  --accent: #68631a;
  --accent-soft: #f3f0bd;
  --link: #424b32;
  --money: #716014;
  --ok: #28704b;
  --pending: #916019;
  --rm: #a34239;
  --primary-btn-bg: #f4ef20;
  --primary-btn-border: #aba720;
  --primary-btn-bg-hover: #fff93a;
  --primary-btn-text: #151713;
  --danger-btn-bg: #f8e4df;
  --danger-btn-border: #bd7262;
  --danger-btn-text: #98372c;
  --danger-btn-bg-hover: #f1d0c7;
  --warn-bg: #ede5cd;
  --warn-border: #b48a35;
  --warn-text: #795414;
  --no-price-bg: #f1e7d2;
  --overlay-bg: #050606b8;
  --chip-stripe: #0005;
  --color-cell-border: #0003;
  --color-cell-selected: #151713;
  --char-row-hover-filter: brightness(.97) saturate(1.1);
  --block-separator: #69716680;
  --ind-manufacture-color: #00656b;
  --ind-reaction-color: #842c9a;
  --ind-planet-color: #a12f67;
  --ind-stopped-color: #973a14;
  --ind-stock-color: #4b651b;
  --ind-surplus-color: #17633d;
  --ind-shortage-color: #805000;
  /* Older modules use these shorter aliases. */
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --line: var(--border);
  --panel: var(--panel-bg);
  --btn-primary-bg: var(--primary-btn-bg);
  --warning: var(--warn-text);
  --warning-border: var(--warn-border);
  --danger: var(--danger-btn-text);
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color-scheme: light;
}

body[data-ui-style="endfield"][data-ef-surface="dark"],
body[data-ui-style="endfield"]:has(#navKills.active) {
  --bg-page: #202223;
  --panel-bg: #282b2b;
  --panel-bg-alt: #303333;
  --subrow-bg: #252828;
  --card-bg: #282b2b;
  --control-bg: #242727;
  --control-bg-hover: #393d3b;
  --pill-bg: #383c39;
  --hist-active-bg: #3d4026;
  --input-bg: #1d2020;
  --text-primary: #e7e8de;
  --text-strong: #fbfcf2;
  --text-secondary: #b3b8af;
  --text-muted: #a0a69d;
  --th-text: #bbc1b6;
  --th-hover: #f5f6ee;
  --raw-text: #b3b8af;
  --modal-h4: #d2d8cd;
  --border: #51584f;
  --border-strong: #788171;
  --border-subtle: #42493e;
  --border-totals: #86927b;
  --accent: #ebe63c;
  --accent-soft: #55532c;
  --link: #dbdb9d;
  --money: #e2d48b;
  --ok: #8fd3a6;
  --pending: #e7c17b;
  --rm: #e79585;
  --danger-btn-bg: #4a302b;
  --danger-btn-text: #f1b4a4;
  --danger-btn-bg-hover: #5a3a32;
  --warn-bg: #49402b;
  --warn-text: #e2cb91;
  --no-price-bg: #49402b;
  --char-row-hover-filter: brightness(1.1);
  --ind-manufacture-color: #7ff;
  --ind-reaction-color: #f7f;
  --ind-planet-color: #fbd;
  --ind-stopped-color: #fa7;
  --ind-stock-color: #ac7;
  --ind-surplus-color: #7f7;
  --ind-shortage-color: #e9c37a;
  color-scheme: dark;
}

/* Navigation and live canvases are dark independently of the document surface. */
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) {
  --bg-page: #131617;
  --panel-bg: #202424;
  --panel-bg-alt: #2a2e2d;
  --subrow-bg: #191c1c;
  --card-bg: #202424;
  --control-bg: #242828;
  --control-bg-hover: #343937;
  --input-bg: #191d1c;
  --btn-bg: #292e2b;
  --btn-bg-hover: #3b423b;
  --text-primary: #e9eae2;
  --text-strong: #fffef5;
  --text-secondary: #b3b9ae;
  --text-muted: #929b8d;
  --btn-text: #eeefe6;
  --th-text: #b4bbaf;
  --border: #3e453b;
  --border-strong: #6d7662;
  --border-subtle: #333b2f;
  --accent: #f4ef20;
  --link: #d9dfae;
  --money: #e6d790;
  --ok: #8ed2a3;
  --pending: #e1b973;
  --warn-bg: #423a25;
  --warn-text: #e1c588;
  --hist-active-bg: #3e4023;
  color: var(--text-primary);
  color-scheme: dark;
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --line: var(--border);
  --panel: var(--panel-bg);
  --warning: var(--warn-text);
  --warning-border: var(--warn-border);
  --danger: var(--danger-btn-text);
}

body[data-ui-style="endfield"].sidebar-enabled {
  --ef-nav-width: 212.4px;
  --ef-nav-font: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  --ef-nav-background: #111111;
  --ef-nav-brand-height: 44px;
  --ef-nav-toolbar-height: 44px;
  --ef-nav-controls-height: calc(var(--ef-nav-brand-height) + var(--ef-nav-toolbar-height) + var(--ef-nav-toolbar-height));
  --ef-nav-row-height: 44px;
  --sidebar-rail-width: 52px;
  --primary-nav-width: var(--ef-nav-width);
  --module-nav-width: calc(var(--primary-nav-width) - var(--sidebar-rail-width));
  /* Account, logo and feature buttons retain the same rail track in both states. */
  --ef-nav-icon-track: calc(var(--sidebar-rail-width) - 19px);
  --module-nav-surface: var(--ef-nav-background);
  --module-nav-border: #343a33;
}
body[data-ui-style="endfield"] #workspaceContent {
  background-color: var(--bg-page);
  background-image: linear-gradient(90deg, #8e94821a 1px, transparent 1px), linear-gradient(#8e94820c 1px, transparent 1px);
  background-size: 64px 64px;
}
body[data-ui-style="endfield"].sidebar-enabled #app > #sidebar {
  box-sizing: border-box;
  padding: 0;
  gap: 0;
  background: var(--ef-nav-background);
  border-right-color: #343a33;
}
/* Both navigation columns keep the same solid surface on every feature route. */
body[data-ui-style="endfield"].sidebar-enabled #workspace > #secondaryNavCard {
  background: var(--ef-nav-background);
  border-right-color: #343a33;
}
body[data-ui-style="endfield"].sidebar-enabled #secondaryNavOpen { background: var(--ef-nav-background); }
body[data-ui-style="endfield"] #secondaryNavToolbar #sidebarQuickSearch { background: var(--ef-nav-background); }
body[data-ui-style="endfield"].sidebar-enabled #sidebar .primary-nav-btn {
  min-height: var(--ef-nav-row-height);
  height: var(--ef-nav-row-height);
  margin: 2px 0;
  border-radius: 2px;
}
body[data-ui-style="endfield"] :is(#sidebar, #secondaryNavCard),
body[data-ui-style="endfield"] :is(#sidebar, #secondaryNavCard) :is(button, input, summary) { font-family: var(--ef-nav-font); }
body[data-ui-style="endfield"] :is(.primary-nav-btn, #secondaryNav .secondary-nav-btn, #secondaryNav .industry-nav-group > summary) {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
}
body[data-ui-style="endfield"].sidebar-enabled #sidebar #sidebarControls { gap: 0; }
body[data-ui-style="endfield"].sidebar-enabled #sidebar #sidebarHeader {
  box-sizing: border-box;
  grid-column: 1 / -1;
  grid-row: 1;
  height: var(--ef-nav-brand-height);
  padding: 0 8px;
  gap: 8px;
  border-bottom: 1px solid var(--module-nav-border);
}
body[data-ui-style="endfield"].sidebar-enabled #app > #sidebar #sidebarToggle {
  display: flex;
  flex-basis: auto;
  width: 100%;
  padding: 0;
  gap: 0;
}
body[data-ui-style="endfield"].sidebar-enabled #app > #sidebar #sidebarBrand {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  grid-template-columns: var(--ef-nav-icon-track) minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  gap: 10px;
}
body[data-ui-style="endfield"].sidebar-enabled #sidebarBrand > .eve-brand-logo { justify-self: center; }
body[data-ui-style="endfield"].sidebar-enabled #sidebar #sidebarAccountRow {
  box-sizing: border-box;
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  height: var(--ef-nav-toolbar-height);
  min-height: var(--ef-nav-toolbar-height);
  border-radius: 0;
  padding: 0 8px;
}
body[data-ui-style="endfield"].sidebar-enabled #sidebar #sidebarAccountQuick .nav-icon { width: 18px; height: 18px; }
body[data-ui-style="endfield"].sidebar-enabled #sidebar #sidebarAccountQuick {
  box-sizing: border-box;
  width: 100%;
  height: var(--ef-nav-toolbar-height);
  min-height: var(--ef-nav-toolbar-height);
  margin: 0;
  grid-template-columns: var(--ef-nav-icon-track) minmax(0, 1fr);
  gap: 10px;
  padding: 0;
}
body[data-ui-style="endfield"].sidebar-enabled #sidebar #primaryNavCard { padding: 10px 8px; border: 0; scrollbar-gutter: stable; }
body[data-ui-style="endfield"].sidebar-enabled #sidebar #primaryNavCard { scrollbar-gutter: auto; scrollbar-width: none; }
body[data-ui-style="endfield"].sidebar-enabled #app > #sidebar .primary-nav-btn {
  grid-template-columns: var(--ef-nav-icon-track) minmax(0, 1fr);
  gap: 10px;
  padding: 0;
}
body[data-ui-style="endfield"].sidebar-enabled.sidebar-expanded #app > #sidebar .eve-server-inline {
  grid-template-columns: var(--ef-nav-icon-track) minmax(0, 1fr);
  padding: 0;
}
body[data-ui-style="endfield"] :is(.primary-nav-btn.active, #secondaryNavCard .secondary-nav-btn.active, #secondaryNav .industry-nav-group.is-current > summary, #eveServerSwitch, .eve-server-menu button.active) {
  color: var(--ef-selected-text);
  background: var(--ef-selected-bg);
  border-color: var(--ef-selected-border);
  font-weight: 800;
  box-shadow: var(--ef-selected-shadow);
}
body[data-ui-style="endfield"] #secondaryNavCard .module-nav-header {
  box-sizing: border-box;
  height: var(--ef-nav-controls-height);
  min-height: var(--ef-nav-controls-height);
  padding: 8px 16px;
}
body[data-ui-style="endfield"] #secondaryNavTitle {
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.4;
  letter-spacing: 0;
}
body[data-ui-style="endfield"] #secondaryNavCard #secondaryNav {
  padding: 10px 8px;
  scrollbar-gutter: auto;
  scrollbar-width: none;
}
body[data-ui-style="endfield"].sidebar-enabled #secondaryNavCard #secondaryNav.simple-secondary .secondary-nav-btn,
body[data-ui-style="endfield"].sidebar-enabled #secondaryNavCard #secondaryNav > .secondary-nav-btn,
body[data-ui-style="endfield"].sidebar-enabled #secondaryNav .industry-nav-group > summary {
  box-sizing: border-box;
  min-height: var(--ef-nav-row-height);
  margin: 2px 0;
  padding: 8px 10px;
}
body[data-ui-style="endfield"].sidebar-enabled #secondaryNav .industry-nav-group { margin: 0; }
body[data-ui-style="endfield"].sidebar-enabled #secondaryNavCard #secondaryNavSearch {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  height: var(--ef-nav-toolbar-height);
  padding: 8px;
}
body[data-ui-style="endfield"].sidebar-enabled #secondaryNavCard #sidebarQuickSearch { height: 36px; }
body[data-ui-style="endfield"] #secondaryNavCard .secondary-nav-btn,
body[data-ui-style="endfield"] #secondaryNav .industry-nav-group > summary {
  border-radius: 2px;
  min-height: 43px;
  color: #d5d9ce;
  background: transparent;
  padding: 10px 12px;
}
body[data-ui-style="endfield"] :is(#sidebarQuickSearch, #secondaryNavToggle, #secondaryNavOpen, #eveServerSwitch) {
  border-radius: 2px;
}
body[data-ui-style="endfield"].sidebar-enabled #sidebar #sidebarServerRow {
  display: flex;
  box-sizing: border-box;
  grid-column: 2;
  grid-row: 2;
  height: var(--ef-nav-toolbar-height);
  min-height: var(--ef-nav-toolbar-height);
  min-width: 0;
  padding: 0 8px;
  gap: 0;
  border-bottom: 1px solid var(--module-nav-border);
}
body[data-ui-style="endfield"] #sidebarServerRow .eve-server-label { display: none; }
body[data-ui-style="endfield"].sidebar-enabled #sidebar #eveServerSwitch { box-sizing: border-box; width: 100%; height: 36px; min-height: 36px; padding: 0; font-size: 11px; line-height: 1.4; letter-spacing: 0; }
body[data-ui-style="endfield"] .eve-server-inline-options button.active {
  color: var(--ef-selected-text);
  background: var(--ef-selected-bg);
  border-color: var(--ef-selected-border);
  box-shadow: var(--ef-selected-shadow);
  font-weight: 800;
}
body[data-ui-style="endfield"] .eve-server-menu { border-radius: 2px; background: var(--ef-nav-background); border-color: #555b4f; }
body[data-ui-style="endfield"] .eve-server-menu button { border-radius: 2px; color: #d5d9ce; }
body[data-ui-style="endfield"] .eve-server-menu button.active { color: var(--ef-selected-text); }
body[data-ui-style="endfield"] #workspaceContent .ef-page-title-duplicate { display: none; }
body[data-ui-style="endfield"]:not(:has(#navKills.active)) #workspace::before,
body[data-ui-style="endfield"]:not(:has(#navKills.active)) #workspace::after { content: none; }

/* The shell owns the banner; it never embeds rendered text or controls in an image. */
body[data-ui-style="endfield"] .ef-page-header {
  position: relative;
  isolation: isolate;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: var(--ef-hero-height);
  overflow: hidden;
  padding: 25px var(--ef-content-pad);
  background: #101615;
  border-bottom: 3px solid var(--ef-yellow);
  color: #fcfcf1;
}
body[data-ui-style="endfield"] .ef-page-header[hidden] { display: none; }
/* Keep the uploaded transparent artwork intact; crop only its empty margins. */
body[data-ui-style="endfield"] .ef-header-brand {
  position: absolute;
  left: var(--ef-brand-left, 0px);
  top: 50%;
  width: var(--ef-brand-width, 0px);
  max-width: calc(100% - 32px);
  aspect-ratio: 1551 / 362;
  overflow: hidden;
  transform: translateY(-50%);
  pointer-events: none;
  visibility: hidden;
}
body[data-ui-style="endfield"] .ef-header-brand[data-ready="true"] { visibility: visible; }
/* Reserve the same text column on every wide header; copy never pushes the logo. */
body[data-ui-style="endfield"] #endfieldPageHeader.ef-page-header:not(.ef-header-brand-below) > .ef-hero-copy {
  width: var(--ef-brand-copy-width) !important;
  max-width: var(--ef-brand-copy-width) !important;
  flex: 0 0 var(--ef-brand-copy-width) !important;
}
body[data-ui-style="endfield"] .ef-native-branded:not(.ef-header-brand-below) > :is(h1,p),
body[data-ui-style="endfield"] .ef-native-branded:not(.ef-header-brand-below) > div:first-child:not(.ef-header-brand) {
  max-width: var(--ef-brand-copy-width);
}
body[data-ui-style="endfield"] .ef-native-branded:not(.ef-header-brand-below) .achievement-heading-actions {
  min-width: 0;
  max-width: 320px;
}
body[data-ui-style="endfield"] .ef-native-branded:not(.ef-header-brand-below) [data-achievement-total] {
  min-width: 0;
  white-space: normal;
}
body[data-ui-style="endfield"] .ef-header-brand-image {
  position: absolute;
  display: block;
  width: 116.054159%;
  max-width: none;
  height: auto;
  left: -11.411992%;
  top: -115.745856%;
}
body[data-ui-style="endfield"] .ef-page-header.ef-header-brand-below {
  height: auto !important;
  padding-bottom: calc(var(--ef-brand-base-bottom, 15px) + 54px) !important;
}
body[data-ui-style="endfield"] .ef-header-brand-below .ef-header-brand {
  left: auto;
  right: var(--ef-brand-right, 16px);
  top: auto;
  bottom: 10px;
  width: min(180px, calc(100% - 32px));
  transform: none;
}
@media print {
  body[data-ui-style="endfield"] .ef-header-brand { display: none; }
  body[data-ui-style="endfield"] .ef-page-header.ef-header-brand-below { padding-bottom: 12px !important; }
}
body[data-ui-style="endfield"] .ef-hero-art {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background-size: cover;
  background-position: center;
  pointer-events: none;
}
body[data-ui-style="endfield"] .ef-hero-scene { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
body[data-ui-style="endfield"] .ef-page-header[data-ef-art="fleet"] .ef-hero-art { object-position: center 45%; }
body[data-ui-style="endfield"] .ef-page-header[data-ef-art="industry"] .ef-hero-art { object-position: center 43%; }
body[data-ui-style="endfield"] .ef-page-header[data-ef-art="exploration"] .ef-hero-art { object-position: center 48%; }
body[data-ui-style="endfield"] .ef-page-header::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, #0c1212f5, #0c1212b8 39%, #0c121214 80%), linear-gradient(0deg, #0d101870, transparent 75%);
}
body[data-ui-style="endfield"] .ef-page-header::after {
  content: '';
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 0;
  width: 4px;
  background: var(--ef-yellow);
}
body[data-ui-style="endfield"] .ef-hero-copy {
  min-width: 0;
  width: min(680px, 76%);
}
body[data-ui-style="endfield"] .ef-eyebrow {
  margin: 0 0 8px;
  color: var(--ef-yellow);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
body[data-ui-style="endfield"] .ef-title {
  margin: 0;
  font-size: clamp(25px, 3.2vw, 45px);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: .015em;
  color: #fffef6;
  overflow-wrap: anywhere;
}
body[data-ui-style="endfield"] .ef-subtitle {
  margin: 10px 0 0;
  max-width: 620px;
  font-size: 13px;
  line-height: 1.65;
  color: #e0e5d7;
}
body[data-ui-style="endfield"] #workspaceContent[data-ef-hero="compact"] { --ef-hero-height: 128px; }
body[data-ui-style="endfield"] #workspaceContent[data-ef-hero="compact"] .ef-page-header { min-height: var(--ef-hero-height); padding-top: 15px; padding-bottom: 15px; }
body[data-ui-style="endfield"] #workspaceContent[data-ef-hero="compact"] .ef-hero-scene { opacity: .5; }
body[data-ui-style="endfield"] #workspaceContent[data-ef-hero="compact"] .ef-title { font-size: 27px; }
body[data-ui-style="endfield"] #workspaceContent[data-ef-hero="compact"] .ef-subtitle { display: none; }
body[data-ui-style="endfield"] #workspaceContent[data-ef-template="canvas"] {
  --ef-hero-height: 124px;
}
body[data-ui-style="endfield"] #workspaceContent[data-ef-template="workbench"] {
  --ef-hero-height: 164px;
}
body[data-ui-style="endfield"] #workspaceContent[data-ef-template="canvas"] .ef-title {
  font-size: clamp(23px, 2.6vw, 34px);
}
body[data-ui-style="endfield"] #workspaceContent[data-ef-template="canvas"] .ef-page-header {
  padding-top: 17px;
  padding-bottom: 17px;
}
body[data-ui-style="endfield"] #workspaceContent[data-ef-template="canvas"] .ef-subtitle {
  margin-top: 6px;
  font-size: 12px;
}

/* Shared controls. Scope known control families; canvas nodes retain their dimensions. */
body[data-ui-style="endfield"] :is(.btn, .mini-btn, .ef-button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: var(--ef-control-height);
  padding: 7px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--ef-radius);
  color: var(--btn-text);
  background: var(--btn-bg);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms, border-color 120ms;
}
body[data-ui-style="endfield"] .mini-btn { min-height: 28px; padding: 4px 8px; font-size: 12px; }
body[data-ui-style="endfield"] :is(.btn, .mini-btn, .ef-button):hover:not(:disabled) {
  background: var(--btn-bg-hover);
  border-color: var(--text-muted);
}
body[data-ui-style="endfield"] :is(.btn.primary, .ef-button[data-variant="primary"], .ef-button--primary) {
  background: var(--primary-btn-bg);
  color: var(--primary-btn-text);
  border-color: var(--primary-btn-border);
  font-weight: 750;
}
body[data-ui-style="endfield"] :is(.btn.primary, .ef-button[data-variant="primary"], .ef-button--primary):hover:not(:disabled) {
  background: var(--primary-btn-bg-hover);
  border-color: #817e1c;
}
body[data-ui-style="endfield"] :is(.btn.danger, .ef-button[data-variant="danger"], .ef-button--danger) {
  background: var(--danger-btn-bg);
  color: var(--danger-btn-text);
  border-color: var(--danger-btn-border);
}
body[data-ui-style="endfield"] .ef-button[data-variant="secondary"] {
  color: var(--text-primary);
  background: var(--panel-bg);
}
body[data-ui-style="endfield"] .ef-button--secondary { color: var(--text-primary); background: var(--panel-bg); }
body[data-ui-style="endfield"] .ef-button[data-variant="quiet"] {
  color: var(--link);
  background: transparent;
  border-color: transparent;
}
body[data-ui-style="endfield"] .ef-button--ghost { color: var(--link); background: transparent; border-color: transparent; }
body[data-ui-style="endfield"] :is(.ef-button--secondary, .ef-button--ghost):hover:not(:disabled) { color: var(--text-primary); background: var(--control-bg-hover); }
body[data-ui-style="endfield"] :is(.btn.danger, .ef-button--danger):hover:not(:disabled) { color: var(--danger-btn-text); background: var(--danger-btn-bg-hover); border-color: var(--danger-btn-border); }
body[data-ui-style="endfield"] :is(button, input, select, textarea):disabled { cursor: not-allowed; }
body[data-ui-style="endfield"] :is(.btn, .mini-btn, .ef-button):disabled { opacity: .48; }
body[data-ui-style="endfield"] :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]) {
  color: var(--text-primary);
  background: var(--input-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--ef-radius);
  min-height: 35px;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  padding: 8px 10px;
}
body[data-ui-style="endfield"] :is(input, textarea)::placeholder { color: var(--text-muted); opacity: 1; }
body[data-ui-style="endfield"] :is(input[type="checkbox"], input[type="radio"], input[type="range"]) { accent-color: var(--accent); }
body[data-ui-style="endfield"] :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
body[data-ui-style="endfield"] .ef-page-header :focus-visible {
  outline-color: var(--ef-yellow);
}
body[data-ui-style="endfield"] :is(.ef-tabs, .mkt-tabs, .ag-kinds, .whe-tabs, .npg-tabs, .npg-scenes, .abyss-tabs, .epp-tabs, .spq-tabs) {
  border-radius: 2px;
}
body[data-ui-style="endfield"] :is(.ef-tabs, .mkt-tabs, .ag-kinds, .whe-tabs, .npg-tabs, .npg-scenes, .abyss-tabs, .epp-tabs, .spq-tabs) :is(button, .tab) {
  border-radius: 2px;
}
body[data-ui-style="endfield"] #workspaceContent :is(.ef-tabs, .mkt-tabs, .ag-kinds, .whe-tabs, .npg-tabs, .npg-scenes, .abyss-tabs, .epp-tabs, .spq-tabs) :is(.active, .is-active, [aria-selected="true"], [aria-pressed="true"], .spq-active) {
  color: var(--ef-selected-text);
  background: var(--ef-selected-bg);
  border-color: var(--ef-selected-border);
  box-shadow: var(--ef-selected-shadow);
  font-weight: 800;
}
body[data-ui-style="endfield"] .ef-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  padding: 0;
  border-bottom: 1px solid var(--border-strong);
  margin: 0 0 16px;
}
body[data-ui-style="endfield"] .ef-tabs button {
  min-height: 39px;
  padding: 8px 17px;
  border: 1px solid var(--border);
  border-bottom: 0;
  color: var(--text-secondary);
  background: var(--panel-bg-alt);
  font: inherit;
  cursor: pointer;
}

body[data-ui-style="endfield"] :is(.panel, .ef-section, .ef-state) {
  background: var(--panel-bg);
  border-color: var(--border);
  border-radius: var(--ef-radius);
  box-shadow: none;
}
body[data-ui-style="endfield"] .ef-section { border: 1px solid var(--border); padding: 20px; margin-bottom: 18px; min-width: 0; }
body[data-ui-style="endfield"] .ef-section > header { display: flex; gap: 14px; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-subtle); padding-bottom: 12px; margin-bottom: 16px; }
body[data-ui-style="endfield"] .ef-section h2 { font-size: 19px; margin: 0; }
body[data-ui-style="endfield"] .ef-section__summary { min-width: 0; }
body[data-ui-style="endfield"] .ef-section__eyebrow { margin: 0 0 4px; color: var(--link); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
body[data-ui-style="endfield"] .ef-section__title { color: var(--text-strong); font-weight: 800; }
body[data-ui-style="endfield"] .ef-section__description { color: var(--text-secondary); font-size: 12px; line-height: 1.7; margin: 7px 0 0; }
body[data-ui-style="endfield"] .ef-section__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body[data-ui-style="endfield"] .ef-section__body { min-width: 0; }
body[data-ui-style="endfield"] .ef-state {
  display: grid;
  place-items: center;
  justify-items: center;
  gap: 10px;
  min-height: 230px;
  padding: 30px 24px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  color: var(--text-secondary);
}
body[data-ui-style="endfield"] .ef-state h2,
body[data-ui-style="endfield"] .ef-state h3 { margin: 0; color: var(--text-strong); font-size: 20px; }
body[data-ui-style="endfield"] .ef-state p { margin: 0; max-width: 650px; line-height: 1.75; }
body[data-ui-style="endfield"] :is(.ef-state-actions, .ef-state__actions) { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
body[data-ui-style="endfield"] .ef-state__mark { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--border-strong); color: var(--accent); font-size: 27px; background: var(--hist-active-bg); }
body[data-ui-style="endfield"] .ef-state--error .ef-state__mark { color: var(--danger-btn-text); background: var(--danger-btn-bg); border-color: var(--danger-btn-border); }
body[data-ui-style="endfield"] .ef-state--loading .ef-state__mark { animation: ef-loading-pulse 1.3s ease-in-out infinite; }
@keyframes ef-loading-pulse { 50% { opacity: .45; } }
body[data-ui-style="endfield"] .ef-notice {
  padding: 11px 14px;
  margin: 12px 0;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--panel-bg-alt);
  border-radius: 2px;
  color: var(--text-secondary);
  line-height: 1.7;
}
body[data-ui-style="endfield"] .ef-notice[data-tone="warning"] { color: var(--warn-text); border-left-color: var(--warn-border); background: var(--warn-bg); }
body[data-ui-style="endfield"] .ef-notice[data-tone="error"] { color: var(--danger-btn-text); border-left-color: var(--danger-btn-border); background: var(--danger-btn-bg); }
body[data-ui-style="endfield"] .ef-notice[data-tone="success"] { color: var(--ok); border-left-color: var(--ok); }
body[data-ui-style="endfield"] .ef-notice--warning { color: var(--warn-text); border-left-color: var(--warn-border); background: var(--warn-bg); }
body[data-ui-style="endfield"] .ef-notice--error { color: var(--danger-btn-text); border-left-color: var(--danger-btn-border); background: var(--danger-btn-bg); }
body[data-ui-style="endfield"] .ef-notice--success { color: var(--ok); border-left-color: var(--ok); }
body[data-ui-style="endfield"] .ef-notice__title { display: block; margin-bottom: 3px; font-weight: 750; }
body[data-ui-style="endfield"] .ef-notice__message { margin: 0; font-size: 13px; }
body[data-ui-style="endfield"] .ef-table-wrap { max-width: 100%; overflow: auto; overscroll-behavior: contain auto; border: 1px solid var(--border); }
body[data-ui-style="endfield"] .ef-table-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
body[data-ui-style="endfield"] .ef-table-wrap :is(th, td) { padding: 11px 12px; border-bottom: 1px solid var(--border-subtle); text-align: left; }
body[data-ui-style="endfield"] .ef-table-wrap th { background: var(--panel-bg-alt); color: var(--th-text); }
body[data-ui-style="endfield"] .ef-table__caption { padding: 12px; text-align: left; color: var(--text-strong); font-weight: 700; background: var(--panel-bg); }
body[data-ui-style="endfield"] .ef-table-wrap .ef-table__numeric { text-align: right; font-variant-numeric: tabular-nums; }
body[data-ui-style="endfield"] .ef-table-wrap .ef-table__empty { padding: 32px 16px; text-align: center; color: var(--text-secondary); }
body[data-ui-style="endfield"] .ef-pagination { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; margin: 22px 0; color: var(--text-secondary); font-size: 12px; }
body[data-ui-style="endfield"] [data-ef-density="compact"] { --ef-control-height: 30px; font-size: 12px; }
body[data-ui-style="endfield"] [data-ef-density="compact"] :is(th, td) { padding-top: 7px; padding-bottom: 7px; }
/* Keep horizontal overflow inside tables; vertical wheels may continue into the page. */
body[data-ui-style="endfield"] :is(.table-wrap, .ef-table-wrap, .ag-table-scroll, .whe-table-scroll, .npg-table-wrap, .mission-table-wrap, .ew-table-wrap, .contract-table-wrap, .epp-table-wrap) { max-width: 100%; overscroll-behavior: contain auto; }
body[data-ui-style="endfield"] :is(.ppp-results, .spq-planet-list) { overscroll-behavior-y: auto; }
body[data-ui-style="endfield"] :is(table.grid, .ef-table-wrap table, .whe-table, .npg-table-wrap table, .ew-table, .mc-comparison-table, .kb-table) { font-variant-numeric: tabular-nums; }
body[data-ui-style="endfield"] :is(table.grid, .whe-table, .ew-table) thead th { background: var(--panel-bg-alt); }

/* Consistent page padding while retaining existing grids, tables, and DOM lifecycles. */
body[data-ui-style="endfield"] #workspaceContent > :is(#main, #marketPage, #lpPage, #industryPage, #wormholePage, #missionPage, #communityPage, #kbPage, #contributorsPage, #knowledgePage) {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: var(--ef-content-pad);
  min-width: 0;
}
body[data-ui-style="endfield"] #workspaceContent[data-ef-template="article"] > main { padding-top: 20px; }
body[data-ui-style="endfield"] :is(.activity-guides, .npc-guides, .agent-directory, .wormhole-effects, .kb-shell, .contributors-page, .spq-page) { color: var(--text-primary); max-width: 1680px; }
body[data-ui-style="endfield"] :is(.npc-guides, .agent-directory, .wormhole-effects, .kb-shell, .contributors-page) { padding: 0; }
body[data-ui-style="endfield"] :is(.activity-guides, .ag-dialog) { --ag-text: var(--text-primary); --ag-muted: var(--text-secondary); --ag-border: var(--border); color: var(--text-primary); }
body[data-ui-style="endfield"] :is(.ag-heading, .npg-heading, .whe-guide, .agd-detail, .mission-title-row, .knowledge-header) :is(h1, h2, h3) { font-weight: 800; }
body[data-ui-style="endfield"] :is(.ag-reference-note, .npg-note, .whe-note, .agd-note) { color: var(--text-secondary); border-left-color: var(--accent); background: var(--panel-bg-alt); }
body[data-ui-style="endfield"] :is(.ag-card.panel, .ag-dialog, .ag-fields > div, .ag-quick-detail, .npg-scene-card, .npg-faction-card, .npg-npc-card, .npg-dialog, .whe-guide, .agd-card, .agd-detail, .ew-shell, .ew-character, .ew-metrics section, .pf-panel) {
  color: var(--text-primary);
  border-color: var(--border);
  background: var(--panel-bg);
  border-radius: var(--ef-radius);
}
body[data-ui-style="endfield"] .ag-card.panel {
  position: relative;
  overflow: hidden;
  padding: 0 17px 16px;
}
body[data-ui-style="endfield"] .ag-card.panel::before {
  content: '';
  display: block;
  height: 100px;
  margin: 0 -17px 13px;
  border-bottom: 1px solid var(--border);
  background-image: linear-gradient(90deg, #0c111652, transparent), var(--ef-card-art);
  background-size: cover;
  background-position: center 42%;
}
body[data-ui-style="endfield"] .ag-card.panel:nth-child(3n + 2)::before { background-size: 145% auto; background-position: 18% 38%; }
body[data-ui-style="endfield"] .ag-card.panel:nth-child(3n)::before { background-size: 135% auto; background-position: right 66%; }
body[data-ui-style="endfield"] .ag-card-title h3 { font-size: 18px; font-weight: 800; }
body[data-ui-style="endfield"] :is(.ag-tags span, .npg-badge) { color: var(--text-secondary); border-color: var(--border-strong); background: var(--panel-bg-alt); border-radius: 2px; }
body[data-ui-style="endfield"] .ag-card-footer .btn { margin-left: auto; }
body[data-ui-style="endfield"] :is(.ag-sources summary, .ag-detail-sources summary, .ag-source a, .npg-sources summary, .npg-scene-card summary, .whe-guide summary, .agd-name, .agd-source summary) { color: var(--link); }
body[data-ui-style="endfield"] :is(.ag-table-scroll th, .npg-table-wrap th, .whe-table th) { background: var(--panel-bg-alt); border-color: var(--border); color: var(--th-text); }
body[data-ui-style="endfield"] :is(.ag-table-scroll td, .whe-table td, .npg-table-wrap td) { border-color: var(--border-subtle); }
body[data-ui-style="endfield"] .whe-table .whe-selected { background: var(--hist-active-bg); border-inline-color: var(--primary-btn-border); }
body[data-ui-style="endfield"] .whe-beneficial { color: var(--ok); }
body[data-ui-style="endfield"] .whe-harmful { color: var(--danger-btn-text); }
body[data-ui-style="endfield"] .whe-mixed { color: var(--pending); }
body[data-ui-style="endfield"] :is(.npg-summary, .npg-stats, .npg-badges, .npg-sources, .npg-controls, .npg-empty, .npg-coverage, .agd-source, .agd-empty, .npg-scenes) { border-color: var(--border); }
body[data-ui-style="endfield"] :is(.npc-guides .hint, .npc-guides small, .agd-card small, .agent-directory .hint, .agd-detail dt, .wormhole-effects .hint, .whe-table th small, .whe-guide h2 small) { color: var(--text-secondary); }
body[data-ui-style="endfield"] :is(.npg-summary dt, .npg-stats dt, .npg-dialog header p) { color: var(--text-secondary); }
body[data-ui-style="endfield"] .npg-name { color: var(--text-strong); }
body[data-ui-style="endfield"] :is(.npg-cap, .npg-limitations) { background: var(--panel-bg-alt); border-color: var(--border-strong); border-radius: 2px; }
body[data-ui-style="endfield"] .agd-detail { border-top: 3px solid var(--primary-btn-border); }
body[data-ui-style="endfield"] .agd-map { border-color: #6c7661; border-radius: 2px; }
body[data-ui-style="endfield"] .agd-high { color: #28704b; }
body[data-ui-style="endfield"] .agd-low { color: #a96413; }
body[data-ui-style="endfield"] .agd-null { color: #ab4437; }
body[data-ui-style="endfield"] .agd-marker.agd-high { color: #80c59a; }
body[data-ui-style="endfield"] .agd-marker.agd-low { color: #e0ad6d; }
body[data-ui-style="endfield"] .agd-marker.agd-null { color: #e28e86; }
body[data-ui-style="endfield"] .mission-index { border-radius: 2px; background: var(--panel-bg); }
body[data-ui-style="endfield"] .mission-list-item { border-radius: 2px; }
body[data-ui-style="endfield"] .mission-list-item.active { color: var(--ef-selected-text); background: var(--ef-selected-bg); border-color: var(--ef-selected-border); box-shadow: var(--ef-selected-shadow); }
body[data-ui-style="endfield"] :is(.mission-pocket, .mission-properties, .mission-combat-grid, .mission-item, .abyss-weather-card, .abyss-brief, .abyss-weather-choice, .abyss-weather-detail, .abyss-environment-card, .abyss-enemy-group, .abyss-room-card) { border-radius: 2px; }
body[data-ui-style="endfield"] .mission-pocket-index { border-radius: 2px; }
body[data-ui-style="endfield"] .abyss-tier-item.active .abyss-tier-number { color: #191a11; border-color: #a5a125; background: var(--ef-yellow); }

/* Industrial tools: regular surfaces, readable inputs, preserved cost/status semantics. */
body[data-ui-style="endfield"] :is(.iw-facility, .iw-editor, .mc-scenario, .mc-dialog, .epp-dialog, .epp-section, .epp-source, .epp-warehouses, .pi-fleet .pf-panel, .pi-planner .panel, .pi-planner .pi-overview > div, .spq-search-panel, .spq-columns > section) {
  border-radius: var(--ef-radius);
  border-color: var(--border);
  background: var(--panel-bg);
  color: var(--text-primary);
}
body[data-ui-style="endfield"] :is(.pi-fleet button, .epp-dialog button, .spq-page button) { background: var(--btn-bg); color: var(--btn-text); border-color: var(--border-strong); border-radius: 2px; }
body[data-ui-style="endfield"] :is(.pi-fleet button, .epp-dialog button, .spq-page button):hover:not(:disabled) { background: var(--btn-bg-hover); border-color: var(--text-muted); }
body[data-ui-style="endfield"] :is(.epp-primary, .spq-page .spq-primary) { background: var(--primary-btn-bg); color: var(--primary-btn-text); border-color: var(--primary-btn-border); }
body[data-ui-style="endfield"] :is(.epp-dialog .epp-primary, .spq-page .spq-primary):hover:not(:disabled) { background: var(--primary-btn-bg-hover); color: var(--primary-btn-text); border-color: var(--primary-btn-border); }
body[data-ui-style="endfield"] :is(.pf-muted, .epp-note, .epp-header p, .epp-sources small, .epp-source small, .mc-comparison-table small) { color: var(--text-secondary); }
body[data-ui-style="endfield"] .pi-fleet .pf-warn { color: var(--warn-text); }
body[data-ui-style="endfield"] .mc-comparison-table thead th { color: var(--text-primary); background: var(--panel-bg-alt); }
body[data-ui-style="endfield"] :is(.spq-covered, .spq-high) { color: var(--ok); }
body[data-ui-style="endfield"] .spq-joint { color: #416b8b; }
body[data-ui-style="endfield"] :is(.spq-low, .spq-missing) { color: var(--pending); }
body[data-ui-style="endfield"] .spq-null { color: var(--danger-btn-text); }
body[data-ui-style="endfield"] :is(.ind-material-matrix > thead th, #mktTable thead th, #mktBatchTable thead th) { background: var(--panel-bg-alt); color: var(--th-text); border-color: var(--border); }
body[data-ui-style="endfield"] :is(.ind-material-list td, .ind-material-matrix > tbody > tr > td, .ind-material-matrix footer) { border-color: var(--border-subtle); }
body[data-ui-style="endfield"] :is(.ind-material-list th, .ind-material-list small, .ind-material-matrix footer, .ind-planet-options label small) { color: var(--text-secondary); }
body[data-ui-style="endfield"] .ind-material-list .ind-plan-node { background: var(--panel-bg-alt); border-color: var(--border-strong); }
body[data-ui-style="endfield"] .ind-material-stock { background: color-mix(in srgb, var(--ok) 14%, var(--panel-bg)); }
body[data-ui-style="endfield"] .ind-material-list .positive { color: var(--ok); }
body[data-ui-style="endfield"] .mkt-estimate-summary { background: var(--border); border-color: var(--border); border-radius: 2px; }
body[data-ui-style="endfield"] .mkt-estimate-summary > div { background: var(--panel-bg-alt); }
body[data-ui-style="endfield"] .mkt-estimate-summary small { color: var(--text-secondary); }
body[data-ui-style="endfield"] .mkt-estimate-summary strong { color: var(--money); }
body[data-ui-style="endfield"] #mktBatchTable .mkt-batch-output-table thead th { background: var(--panel-bg-alt); }
body[data-ui-style="endfield"] :is(.ind-guide, .ind-guide th, .ind-guide tr:nth-child(even)) { background: var(--panel-bg); border-color: var(--border); color: var(--text-primary); border-radius: 2px; }
body[data-ui-style="endfield"] .ind-guide h3 { color: var(--text-strong); }
body[data-ui-style="endfield"] .ind-guide a { color: var(--link); }
body[data-ui-style="endfield"] .ind-guide strong { color: var(--money); }
body[data-ui-style="endfield"] .ind-guide nav a { background: var(--panel-bg-alt); }
body[data-ui-style="endfield"] .fleet-ledger-tabs { background: var(--bg-page); border-radius: 2px; }
body[data-ui-style="endfield"] .fleet-payment-state { color: var(--pending); }
body[data-ui-style="endfield"] .fleet-payment-state.paid { color: var(--ok); }
body[data-ui-style="endfield"] .fleet-ledger-warning { color: var(--warn-text); }
body[data-ui-style="endfield"] :is(.iw-warning, .epp-warning, .emr-warning) { color: var(--warn-text); background: var(--warn-bg); border-color: var(--warn-border); border-radius: 2px; }
body[data-ui-style="endfield"] :is(.ew-warning, .ecm-warning, .emr-deficit strong, .emr-dialog .has-deficit td:last-child, .epp-deficit td:nth-child(7)) { color: var(--warn-text); }
body[data-ui-style="endfield"] :is(.iw-notice, .mc-exact td:last-child, .epp-financial-metrics .positive strong) { color: var(--ok); }
body[data-ui-style="endfield"] :is(.mc-errors, .mc-short td:nth-child(4), .mc-short td:last-child, .epp-financial-metrics .negative strong, .epp-dialog small.epp-target-error) { color: var(--danger-btn-text); }
body[data-ui-style="endfield"] .epp-scheduling .epp-warning small { color: var(--warn-text); }
body[data-ui-style="endfield"] .iw-index-value strong { color: var(--money); }
body[data-ui-style="endfield"] .ew-industry-wrap { background: var(--panel-bg); }
body[data-ui-style="endfield"] .ew-industry-table { color: var(--text-primary); }
body[data-ui-style="endfield"] .ew-industry-table thead { color: var(--th-text); background: var(--panel-bg-alt); }
body[data-ui-style="endfield"] .ew-industry-table :is(th, td) { border-color: var(--border-subtle); }
body[data-ui-style="endfield"] .iw-snapshot-dialog { color: var(--text-primary); background: var(--panel-bg); border-color: var(--border-strong); border-radius: 3px; }

/* Contract search owns its own scrolling columns; it must fit below the shared banner. */
body[data-ui-style="endfield"] .contract-panel {
  height: max(570px, calc(100dvh - var(--ef-header-measured, var(--ef-hero-height)) - 76px));
  background: var(--panel-bg) !important;
}
body[data-ui-style="endfield"] :is(.contract-filter-panel, .contract-results, .contract-table, .contract-statusbar, .contract-drawer) { background: var(--panel-bg); color: var(--text-primary); border-color: var(--border); }
body[data-ui-style="endfield"] :is(.contract-heading, .contract-filter-panel label, .contract-filter-group, .contract-sort, .contract-meta, .contract-status, .contract-empty) { color: var(--text-secondary); }
body[data-ui-style="endfield"] :is(.contract-table th, .contract-results-toolbar, .contract-table tbody tr:hover) { background: var(--panel-bg-alt); color: var(--text-primary); border-color: var(--border); }
body[data-ui-style="endfield"] .contract-table :is(th, td) { border-color: var(--border-subtle); }
body[data-ui-style="endfield"] .contract-market-tabs .tab { background: var(--panel-bg-alt); color: var(--text-primary); border-color: var(--border); }
body[data-ui-style="endfield"] .contract-market-tabs .tab.active { background: var(--ef-selected-bg); color: var(--ef-selected-text); border-color: var(--ef-selected-border); box-shadow: var(--ef-selected-shadow); }

/* Articles and encyclopedia. Real text stays selectable and source links remain visible. */
body[data-ui-style="endfield"] #explorationPage { background: var(--bg-page); color: var(--text-primary); }
body[data-ui-style="endfield"] .exploration-reader { padding: var(--ef-content-pad); }
body[data-ui-style="endfield"] :is(.exploration-hero, .exploration-notice, .exploration-tools, .exploration-toc-panel, .exploration-toc-heading, .exploration-article-shell) { background: var(--panel-bg); border-color: var(--border); color: var(--text-primary); border-radius: 2px; box-shadow: none; }
body[data-ui-style="endfield"] .exploration-notice.warning { background: var(--warn-bg); border-color: var(--warn-border); }
body[data-ui-style="endfield"] :is(.exploration-hero p, .exploration-notice p, .exploration-notice dt, .exploration-tools strong, .exploration-loading-line, .exploration-article-status, .exploration-toc-panel a) { color: var(--text-secondary); }
body[data-ui-style="endfield"] .exploration-kicker { color: var(--link); background: var(--hist-active-bg); border-color: var(--primary-btn-border); border-radius: 2px; }
body[data-ui-style="endfield"] .exploration-tools button { background: var(--btn-bg); color: var(--btn-text); border-color: var(--border-strong); border-radius: 2px; }
body[data-ui-style="endfield"] .exploration-toc-panel a:hover { color: var(--text-strong); background: var(--hist-active-bg); border-left-color: var(--primary-btn-border); }
body[data-ui-style="endfield"] .exploration-toc-panel a.active { color: var(--ef-selected-text); background: var(--ef-selected-bg); border-color: var(--ef-selected-border); box-shadow: var(--ef-selected-shadow); }
body[data-ui-style="endfield"] .exploration-markdown { color: var(--text-primary); }
body[data-ui-style="endfield"] .exploration-markdown :is(h1, h2, h3, h4, h5, h6) { color: var(--text-strong); border-color: var(--border); }
body[data-ui-style="endfield"] .exploration-markdown a { color: var(--link); }
body[data-ui-style="endfield"] .exploration-markdown blockquote { color: var(--text-secondary); background: var(--panel-bg-alt); border-color: var(--primary-btn-border); }
body[data-ui-style="endfield"] .exploration-markdown table { color: var(--text-primary); background: var(--panel-bg); }
body[data-ui-style="endfield"] .exploration-markdown :is(th, td) { border-color: var(--border); }
body[data-ui-style="endfield"] .exploration-markdown th { color: var(--text-strong); background: var(--panel-bg-alt); }
body[data-ui-style="endfield"] .exploration-markdown tr:nth-child(even) td { background: var(--subrow-bg); }
body[data-ui-style="endfield"] .exploration-markdown :is(code, pre) { color: var(--money); background: var(--subrow-bg); border-color: var(--border); }
body[data-ui-style="endfield"] .exploration-table-scroll { border-color: var(--border); border-radius: 2px; }
body[data-ui-style="endfield"] #knowledgePage .knowledge-entry { background: var(--panel-bg); border-radius: 2px; padding: 17px; border: 1px solid var(--border); }
body[data-ui-style="endfield"] #knowledgePage .knowledge-list { gap: 14px; }
body[data-ui-style="endfield"] #knowledgePage .item-library-list { gap: 12px; border: 0; margin-top: 16px; }
body[data-ui-style="endfield"] #knowledgePage .item-library-entry { padding: 16px; border: 1px solid var(--border); background: var(--panel-bg); border-radius: 2px; }
body[data-ui-style="endfield"] .contributors-page { background: none; }
body[data-ui-style="endfield"] :is(.contributors-heading h1, .contributor-card strong, .contributor-card-copy h2, .contributor-profile-summary h2) { color: var(--text-strong); }
body[data-ui-style="endfield"] :is(.contributors-kicker, .contributors-heading p, .contributor-card-copy p, .contributor-card-copy small, .contributors-invitation, .contributor-card-unavailable) { color: var(--text-secondary); }
body[data-ui-style="endfield"] .contributor-card { background: var(--panel-bg); border-color: var(--border-strong); }
body[data-ui-style="endfield"] .contributor-card.featured { border-color: var(--primary-btn-border); background: var(--hist-active-bg); }
body[data-ui-style="endfield"] :is(.contributors-loading, .contributors-empty, .contributors-invitation) { color: var(--text-secondary); background: var(--panel-bg); border-color: var(--border); border-radius: 2px; }
body[data-ui-style="endfield"] .contributor-card:is(:hover, :focus-visible) { color: var(--text-primary); background: var(--hist-active-bg); border-color: var(--primary-btn-border); box-shadow: inset 0 0 0 2px var(--primary-btn-border); }
body[data-ui-style="endfield"] .contributor-drawer {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: linear-gradient(90deg, #8e948212 1px, transparent 1px) 0 0 / 64px 64px, linear-gradient(#8e948212 1px, transparent 1px) 0 0 / 64px 64px, var(--panel-bg);
}
body[data-ui-style="endfield"] .contributor-drawer-titlebar { background: var(--panel-bg-alt); border-color: var(--border); }
body[data-ui-style="endfield"] :is(.contributor-window-title h2, .contributor-profile-summary h3, .contributor-entity-summary h3, .contributor-character-title strong, .contributor-employment h3, .contributor-biography h3, .contributor-organization-description h3, .contributor-markdown strong, .contributor-esi-description strong) { color: var(--text-strong); }
body[data-ui-style="endfield"] :is(.contributor-profile-header, .contributor-entity-header) {
  background: linear-gradient(105deg, color-mix(in srgb, var(--entity-accent) 10%, var(--panel-bg-alt)), var(--panel-bg-alt));
  border-color: var(--border);
}
body[data-ui-style="endfield"] :is(.contributor-window-back, .contributor-window-close) { color: var(--text-secondary); }
body[data-ui-style="endfield"] :is(.contributor-window-back, .contributor-window-close):is(:hover, :focus-visible) { color: var(--text-strong); outline-color: var(--accent); }
body[data-ui-style="endfield"] .contributor-window-info { color: var(--text-primary); background: var(--control-bg); border: 1px solid var(--border-strong); }
body[data-ui-style="endfield"] .contributor-data-warning { color: var(--warn-text); background: var(--warn-bg); border-color: var(--warn-border); }
body[data-ui-style="endfield"] .contributor-window-body { scrollbar-color: var(--border-strong) var(--panel-bg); }
body[data-ui-style="endfield"] :is(.contributor-character-title, .contributor-affiliations > div, .contributor-detail-row dt, .contributor-employment-range, .contributor-empty-copy, .contributor-ticker, .contributor-relation-empty) { color: var(--text-secondary); }
body[data-ui-style="endfield"] .contributor-detail-row dd { color: var(--text-primary); }
body[data-ui-style="endfield"] :is(.contributor-relation, .contributor-employment-corporation .contributor-relation, .contributor-esi-description a) { color: var(--link); }
body[data-ui-style="endfield"] .contributor-relation:is(:hover, :focus-visible) { color: var(--text-strong); outline: 2px solid var(--accent); outline-offset: 2px; }
body[data-ui-style="endfield"] .security-positive dd { color: var(--ok); }
body[data-ui-style="endfield"] .security-negative dd { color: var(--danger-btn-text); }
body[data-ui-style="endfield"] .security-neutral dd { color: var(--text-secondary); }
body[data-ui-style="endfield"] .contributor-tabs { border-color: var(--border); }
body[data-ui-style="endfield"] .contributor-tabs button { color: var(--text-secondary); }
body[data-ui-style="endfield"] .contributor-tabs button.active { color: var(--ef-selected-text); background: var(--ef-selected-bg); border-color: var(--ef-selected-border); box-shadow: var(--ef-selected-shadow); }
body[data-ui-style="endfield"] .contributor-employment-warning { color: var(--warn-text); }
body[data-ui-style="endfield"] .contributor-tone-white { color: var(--text-strong); }
body[data-ui-style="endfield"] :is(.contributor-tone-gray, .contributor-tone-silver) { color: var(--text-secondary); }
body[data-ui-style="endfield"] .community { color: var(--text-primary); padding: 0; }
body[data-ui-style="endfield"] :is(.community-card, .community-detail, .community-editor) { background: var(--panel-bg); color: var(--text-primary); border-color: var(--border); border-radius: 2px; }
body[data-ui-style="endfield"] :is(.community small, .community footer, .community header p, .community-empty) { color: var(--text-secondary); }
body[data-ui-style="endfield"] .community .primary { background: var(--ef-yellow); color: #17190e; }
body[data-ui-style="endfield"] .community [data-status] { color: var(--warn-text); }
body[data-ui-style="endfield"] .fw-page { --fw-muted: var(--text-secondary); --fw-line: var(--border); --fw-gold: var(--accent); color: var(--text-primary); padding: 0; }
body[data-ui-style="endfield"] :is(.fw-rule-banner, .fw-ship-card, .fw-site-card, .fw-selected-ship, .fw-search-matches button, .fw-empty, .fw-loading, .fw-scope) { background: var(--panel-bg); color: var(--text-primary); border-color: var(--border); border-radius: 2px; }
body[data-ui-style="endfield"] :is(.fw-rule-banner p, .fw-selected-ship p, .fw-site-rule, .fw-site-reason) { color: var(--text-secondary); }
body[data-ui-style="endfield"] .fw-switch button { background: var(--panel-bg-alt); color: var(--text-primary); }
body[data-ui-style="endfield"] .fw-switch button[aria-pressed="true"] { color: #171910; background: var(--ef-yellow); box-shadow: inset 0 -2px 0 #9d9a32; }
body[data-ui-style="endfield"] :is(.fw-pager button, .fw-empty button, .fw-quick-ships button) { background: var(--btn-bg); color: var(--btn-text); }
body[data-ui-style="endfield"] :is(.fw-ship-card:hover, .fw-site-card:hover) { background: var(--hist-active-bg); border-color: var(--primary-btn-border); }
body[data-ui-style="endfield"] .fw-count-allowed { color: var(--ok); }
body[data-ui-style="endfield"] .fw-allowed { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--panel-bg)); }
body[data-ui-style="endfield"] .fw-blocked { color: var(--danger-btn-text); background: var(--danger-btn-bg); }
body[data-ui-style="endfield"] :is(.fw-unknown, .fw-unavailable) { color: var(--pending); background: var(--warn-bg); }
body[data-ui-style="endfield"] :is(.fw-help summary, .fw-help a) { color: var(--link); }

/* Combat reports retain red/blue sides and damage bars. Only surfaces and neutral text change. */
/* Let the original shared combat scene show through the content and module menu. */
body[data-ui-style="endfield"]:has(#navKills.active) #workspaceContent { background: transparent; }
body[data-ui-style="endfield"]:has(#navKills.active) #kbPage {
  --panel-bg: #101a27a3;
  --panel-bg-alt: #15233380;
  --input-bg: #0b1525e0;
  --btn-bg: #0b1525d9;
  --btn-bg-hover: #20374bd9;
  --text-primary: #e5eef8;
  --text-strong: #f3f7ff;
  --text-secondary: #b3c3d7;
  --text-muted: #95a8bf;
  --th-text: #b3c3d7;
  --border: #91abc52b;
  --border-strong: #96b6d44d;
  --border-subtle: #90b3d217;
  color: var(--text-primary);
  color-scheme: dark;
}
body[data-ui-style="endfield"] :is(.kb-shell, .kb-eve-surface, .kb-eve-surface .kb-eve-content, .kb-war, .kb-analytics) { color: var(--text-primary); background: transparent; }
body[data-ui-style="endfield"] :is(.kb-filters, .kb-list-panel, .kb-card, .kb-analysis-overview, .kb-analysis-panel, .kb-war-compare, .kb-contributions, .kb-battle-extra, .kb-battle-time-selector, .kb-eve-reports .kb-report-card, .kb-roster-dialog) { color: var(--text-primary); background: var(--panel-bg); border-color: var(--border); border-radius: 2px; }
body[data-ui-style="endfield"] :is(.kb-list th, .kb-list tbody tr:hover, .kb-contribution-table th, .kb-roster-preview th) { background: var(--panel-bg-alt); color: var(--th-text); }
body[data-ui-style="endfield"] :is(.kb-table th, .kb-table td, .kb-analysis-compare-table th, .kb-analysis-compare-table td) { border-color: var(--border-subtle); }
body[data-ui-style="endfield"] :is(.kb-open, .kb-analysis-panel h3, .kb-analysis-number strong, .kb-analysis-km, .kb-analysis-kpis strong, .kb-eve-header h1, .kb-report-title h1) { color: var(--text-primary); }
body[data-ui-style="endfield"] :is(.kb-header p, #kbStatus, .kb-muted, .kb-time, .kb-analysis-panel header p, .kb-analysis-note, .kb-analysis-eyebrow, .kb-analysis-number small, .kb-analysis-kpis small, .kb-analysis-kpis span, .kb-summary-id, .kb-summary-org, .kb-war-compare-note, .kb-war-compare-label, .kb-contributions summary small) { color: var(--text-secondary); }
body[data-ui-style="endfield"] .kb-value { color: var(--money); }
body[data-ui-style="endfield"] .kb-tag { background: var(--panel-bg-alt); border-color: var(--border); color: var(--text-secondary); }
body[data-ui-style="endfield"] :is(.killmail-source, .killmail-hero, .killmail-metrics > div, .kb-team-assignment, .kb-team-expand, .kb-team-group, .kb-team-character-grid .kb-team-group) { background: var(--panel-bg); border-color: var(--border); color: var(--text-primary); }
body[data-ui-style="endfield"] :is(.killmail-page-head h1, .killmail-import > label, .killmail-hero h2, .killmail-empty strong, .killmail-metrics strong, .kb-team-node-meta, .kb-team-expand-heading strong, .kb-team-pilot-ship) { color: var(--text-strong); }
body[data-ui-style="endfield"] :is(.killmail-source strong, .killmail-place, .kb-team-inherit) { color: var(--link); }
body[data-ui-style="endfield"] .killmail-table th { color: var(--th-text); background: var(--panel-bg-alt); }
body[data-ui-style="endfield"] :is(.killmail-table th, .killmail-table td, .killmail-section-title, .killmail-empty) { border-color: var(--border-subtle); }
body[data-ui-style="endfield"] .killmail-metrics { background: var(--border); }
body[data-ui-style="endfield"] :is(.kb-team-group .kb-team-node-label > small, .kb-team-node-state, .kb-team-help, .kb-team-expand-heading small, .kb-team-character-heading, .kb-team-pilot-ship-unknown, .kb-team-character-pager) { color: var(--text-secondary); }
body[data-ui-style="endfield"] .kb-team-group:hover { background: var(--panel-bg-alt); }

/* Report details also open above light workspaces, so own their dark palette. */
body[data-ui-style="endfield"] :is(.battle-sandbox-modal, .kb-detail-shell) {
  --panel-bg: #111b28;
  --panel-bg-alt: #1a2939;
  --subrow-bg: #0d1621;
  --card-bg: #111b28;
  --input-bg: #0b1525;
  --btn-bg: #182635;
  --btn-bg-hover: #263b50;
  --btn-text: #e5eef8;
  --text-primary: #e5eef8;
  --text-strong: #f3f7ff;
  --text-secondary: #b3c3d7;
  --text-muted: #95a8bf;
  --th-text: #b3c3d7;
  --border: #314254;
  --border-strong: #4c647a;
  --border-subtle: #27384b;
  --money: #e8cf8a;
  --link: #aac9f0;
  color: var(--text-primary);
  color-scheme: dark;
}
body[data-ui-style="endfield"] .kb-detail-shell .kb-fitting {
  background: radial-gradient(ellipse at 50% 40%, #1b2c3a, var(--panel-bg) 70%);
}
body[data-ui-style="endfield"] .kb-detail-shell .kb-metrics > div { background: var(--panel-bg); }
body[data-ui-style="endfield"] .kb-detail-shell .kb-metrics strong { color: var(--text-strong); }
body[data-ui-style="endfield"] .kb-detail-shell .kb-metrics .kb-value { color: var(--money); }
body[data-ui-style="endfield"] .kb-detail-shell .kb-group th { background: var(--panel-bg-alt); color: var(--text-secondary); }
body[data-ui-style="endfield"] .kb-detail-shell .kb-final { background: #3b3020; color: #edc57d; }
body[data-ui-style="endfield"] .kb-detail-shell .kb-loot-row { background: #15352e; }
body[data-ui-style="endfield"] .kb-detail-shell .kb-dropped { color: #9bdfba; }
body[data-ui-style="endfield"] .kb-detail-shell .kb-destroyed { color: #ff9ca3; }

/* Embedded application heights: retain the canvas itself and use workspace flow. */
html:has(body[data-ui-style="endfield"].ship-tree-mode) { overflow: auto; scrollbar-gutter: stable; }
body[data-ui-style="endfield"].ship-tree-mode { overflow: auto; }
body[data-ui-style="endfield"].ship-tree-mode #app,
body[data-ui-style="endfield"].ship-tree-mode #workspace { display: flex; }
body[data-ui-style="endfield"].ship-tree-mode #workspace { min-height: 0; flex-direction: row; }
body[data-ui-style="endfield"].sidebar-enabled.ship-tree-mode #workspaceContent > #knowledgePage.ship-tree-mode {
  position: relative;
  inset: auto;
  width: 100%;
  height: max(580px, calc(100dvh - var(--ef-header-measured, var(--ef-hero-height))));
  max-width: none;
  padding: 0;
  margin: 0;
}
body[data-ui-style="endfield"] .ship-tree-page { height: 100%; min-height: 580px; }
body[data-ui-style="endfield"].sidebar-enabled.starmap-active #workspaceContent { height: auto; min-height: 100dvh; }
body[data-ui-style="endfield"].sidebar-enabled.starmap-active #workspaceContent > #starMapPage {
  height: max(480px, calc(100dvh - var(--ef-header-measured, var(--ef-hero-height))));
  flex: 0 0 auto;
  min-height: 480px;
}
body[data-ui-style="endfield"] :is(.starmap-app, .starmap-stage, .ship-tree-viewport) { background-color: #090e0e; }
body[data-ui-style="endfield"] .starmap-planner { background: #151b18; border-color: #3e4938; }
body[data-ui-style="endfield"] #secondaryNavCard .starmap-planner { background: var(--ef-nav-background); }
/* Narrow navigation keeps planner controls readable instead of clipping labels. */
body[data-ui-style="endfield"].sidebar-enabled #secondaryNavCard .starmap-tool-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body[data-ui-style="endfield"].sidebar-enabled #secondaryNavCard .starmap-side-legend { grid-template-columns: repeat(auto-fit, minmax(22px, 1fr)); }
body[data-ui-style="endfield"].sidebar-enabled #secondaryNavCard .planner-actions { grid-template-columns: minmax(0, 1fr); }
body[data-ui-style="endfield"] :is(.starmap-view-menu button.active, .sf-root button.active) { background: var(--ef-selected-bg); border-color: var(--ef-selected-border); color: var(--ef-selected-text); box-shadow: var(--ef-selected-shadow); }
body[data-ui-style="endfield"] .cp-header h1 { color: var(--text-strong); }
body[data-ui-style="endfield"] .career-planner-page { background: var(--bg-page); color: var(--text-primary); padding: 0; }
body[data-ui-style="endfield"] .cp-viewport { height: max(500px, calc(100dvh - var(--ef-header-measured, var(--ef-hero-height)) - 220px)); }
body[data-ui-style="endfield"] .cp-map-shell { border-color: #596447; border-radius: 2px; }
body[data-ui-style="endfield"] .cp-categorybar button { color: var(--text-secondary); }
body[data-ui-style="endfield"] .cp-categorybar button.is-active { color: var(--ef-selected-text); background: var(--ef-selected-bg); border-color: var(--ef-selected-border); box-shadow: var(--ef-selected-shadow); }
body[data-ui-style="endfield"] .cp-categorybar button:hover:not(.is-active) { background: var(--hist-active-bg); color: var(--text-primary); }
body[data-ui-style="endfield"] #explorationPage:has(#explorationHackingHost:not([hidden]) .hacking-simulator) { min-height: 0; }
body[data-ui-style="endfield"] :is(.hacking-simulator, .hacking-board-shell) { min-height: 620px; }
body[data-ui-style="endfield"] .hacking-board-shell { height: max(620px, calc(100dvh - var(--ef-header-measured, var(--ef-hero-height)))); }
body[data-ui-style="endfield"] #fittingPage { width: 100%; min-width: 0; }
body[data-ui-style="endfield"] .eveshipfit-upstream-root { border-top: 1px solid #6f774b; }
body[data-ui-style="endfield"] .community-share { background: var(--ef-yellow); color: #161910; border-color: #aba626; border-radius: 2px; }

@media (min-width: 901px) {
  body[data-ui-style="endfield"].sidebar-enabled #workspace > #secondaryNavCard { flex-basis: var(--module-nav-width); width: var(--module-nav-width); }
}
@media (max-width: 1180px) {
  body[data-ui-style="endfield"].sidebar-enabled { --ef-nav-width: 190.8px; }
  body[data-ui-style="endfield"] .ag-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  body[data-ui-style="endfield"] { --ef-hero-height: 160px; --ef-content-pad: 16px; }
  body[data-ui-style="endfield"].sidebar-enabled { --sidebar-rail-width: 48px; --ef-nav-width: min(212.4px, calc(100vw - var(--sidebar-rail-width) - 16px)); }
  body[data-ui-style="endfield"].sidebar-enabled #workspace > #secondaryNavCard { width: var(--module-nav-width); }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-template="canvas"] { --ef-hero-height: 118px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-template="workbench"] { --ef-hero-height: 145px; }
  body[data-ui-style="endfield"] .ef-hero-copy { width: min(670px, 92%); }
  body[data-ui-style="endfield"] .ef-page-header::before { background: linear-gradient(90deg, #101514f2, #101514b8 60%, #10151460); }
}
@media (max-width: 720px) {
  body[data-ui-style="endfield"] .contract-panel { height: auto; min-height: 600px; overflow: visible; }
  body[data-ui-style="endfield"] .contract-search-form { height: auto; }
  body[data-ui-style="endfield"] .contract-result-body { min-height: 300px; }
}
@media (max-width: 620px) {
  body[data-ui-style="endfield"] { --ef-hero-height: 152px; --ef-content-pad: 12px; font-size: 13px; }
  body[data-ui-style="endfield"] .ef-page-header { padding: 19px 15px; }
  body[data-ui-style="endfield"] .ef-page-header { padding-bottom: 34px; }
  body[data-ui-style="endfield"] .ef-title { font-size: 26px; }
  body[data-ui-style="endfield"] .ef-eyebrow { font-size: 10px; letter-spacing: .08em; }
  body[data-ui-style="endfield"] .ef-subtitle { font-size: 12px; }
  body[data-ui-style="endfield"] .ag-list { grid-template-columns: minmax(0, 1fr); }
  body[data-ui-style="endfield"] .ag-card.panel::before { height: 94px; }
  body[data-ui-style="endfield"] .ef-section { padding: 14px; }
  body[data-ui-style="endfield"] .ef-section > header { flex-wrap: wrap; }
  body[data-ui-style="endfield"] .ef-state { min-height: 200px; padding: 22px 16px; }
  body[data-ui-style="endfield"] .cp-header { flex-wrap: wrap; align-items: flex-start; }
  body[data-ui-style="endfield"] .cp-header nav { flex-wrap: wrap; flex-shrink: 1; min-width: 0; }
  body[data-ui-style="endfield"] .cp-filterbar { max-width: calc(100vw - var(--sidebar-rail-width, 48px) - var(--ef-content-pad) - var(--ef-content-pad)); }
}
@media (prefers-reduced-motion: reduce) {
  body[data-ui-style="endfield"], body[data-ui-style="endfield"] :is(.btn, .mini-btn, .ef-button) { transition: none; }
  body[data-ui-style="endfield"] .ef-state--loading .ef-state__mark { animation: none; }
}
body[data-ui-style="endfield"] :is(.ef-page-header, .ef-state, .ef-notice, .ef-section, .ef-tabs, .ef-pagination, .ef-table-wrap) [hidden],
body[data-ui-style="endfield"] :is(.ef-page-header, .ef-state, .ef-notice, .ef-section, .ef-tabs, .ef-pagination, .ef-table-wrap)[hidden] { display: none !important; }
body[data-ui-style="endfield"] #workspaceContent[data-ef-hero="compact"] { --ef-hero-height: 128px; }
/* Bulk appraisal keeps the artwork while reserving the first screen for the input and results. */
@media screen {
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="market"][data-ef-page="07"] .ef-page-header { box-sizing: border-box; min-height: 112px; height: 112px; padding: 13px var(--ef-content-pad); }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="market"][data-ef-page="07"] .ef-page-header::after { top: 14px; bottom: 14px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="market"][data-ef-page="07"] .ef-eyebrow { margin-bottom: 5px; font-size: 11px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="market"][data-ef-page="07"] .ef-title { font-size: 31px; line-height: 1.2; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="market"][data-ef-page="07"] .ef-subtitle { margin-top: 6px; font-size: 12px; line-height: 1.5; }
}
@media screen and (max-width:700px) {
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="market"][data-ef-page="07"] .ef-page-header { min-height: 104px; height: auto; padding: 12px 16px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="market"][data-ef-page="07"] .ef-hero-copy { width: 100%; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="market"][data-ef-page="07"] .ef-title { font-size: 27px; }
}
/* Industry overview reserves the first screen for capacity, characters and jobs. */
@media screen {
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="industry"][data-ef-page="09"] { --ef-hero-height: 112px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="industry"][data-ef-page="09"] .ef-page-header { box-sizing: border-box; min-height: 112px; height: 112px; padding: 13px var(--ef-content-pad); }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="industry"][data-ef-page="09"] .ef-page-header::after { top: 14px; bottom: 14px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="industry"][data-ef-page="09"] .ef-eyebrow { margin-bottom: 5px; font-size: 11px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="industry"][data-ef-page="09"] .ef-title { font-size: 31px; line-height: 1.2; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="industry"][data-ef-page="09"] .ef-subtitle { margin-top: 6px; font-size: 12px; line-height: 1.5; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="industry"][data-ef-page="09"] .ew-industry-shell { border: 0; border-radius: 0; background: transparent; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="industry"][data-ef-page="09"] .ew-industry-shell > .ew-head h2 { display: none; }
  body[data-ui-style="endfield"] .ew-industry-shell .ew-capacity-summary .ew-metrics > section { border-radius: 0; background: transparent; }
  body[data-ui-style="endfield"] .ew-industry-shell .ew-status-tabs > button.btn { color: var(--text-secondary); background: transparent; border-color: transparent; box-shadow: none; }
  body[data-ui-style="endfield"] .ew-industry-shell .ew-status-tabs > button.btn:hover:not(:disabled) { color: var(--text-primary); background: var(--panel-bg-alt); border-color: transparent; }
  body[data-ui-style="endfield"] .ew-industry-shell .ew-status-tabs > button.btn[aria-pressed="true"],
  body[data-ui-style="endfield"] .ew-industry-shell .ew-status-tabs > button.btn[aria-pressed="true"]:hover:not(:disabled) { color: var(--text-strong); background: var(--panel-bg); border-bottom-color: var(--accent); }
}
@media screen and (max-width:700px) {
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="industry"][data-ef-page="09"] .ef-page-header { min-height: 104px; height: auto; padding: 12px 16px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="industry"][data-ef-page="09"] .ef-hero-copy { width: 100%; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="industry"][data-ef-page="09"] .ef-title { font-size: 27px; }
}
@media print {
  body[data-ui-style="endfield"] .ef-page-header { min-height: 0; background: none; color: #111; padding: 12px 0; border-color: #666; }
  body[data-ui-style="endfield"] .ef-page-header :is(.ef-title, .ef-subtitle, .ef-eyebrow) { color: #111; }
  body[data-ui-style="endfield"] .ef-hero-art,
  body[data-ui-style="endfield"] .ef-page-header::before,
  body[data-ui-style="endfield"] .ef-page-header::after { display: none; }
}

/* Fleet record only: a short ship banner leaves room for the ledger rows. */
@media screen {
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="01"] { --ef-hero-height: 138px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="01"] .ef-page-header { box-sizing: border-box; min-height: 138px; height: 138px; gap: 16px; padding: 14px var(--ef-content-pad); border-bottom-width: 2px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="01"] .ef-page-header::after { top: 16px; bottom: 16px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="01"] .ef-hero-copy { width: auto; max-width: 680px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="01"] .ef-eyebrow { margin-bottom: 5px; font-size: 11px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="01"] .ef-title { font-size: 36px; line-height: 1.2; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="01"] .ef-subtitle { display: block; margin-top: 6px; font-size: 12px; line-height: 1.5; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="01"] .ef-header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; margin-left: auto; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="01"] #fleetHeaderImport { min-height: 37px; background: #101615a6; color: #fafbf5; border-color: #d9dcd3aa; font-size: 12px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="01"] #fleetHeaderImport:hover { background: #101615e6; border-color: #f4ef20; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="01"] > #main.fleet-record-workspace { padding-top: 16px; padding-bottom: 0; }
  body[data-ui-style="endfield"] #main.fleet-record-workspace :is(.fleet-record-actions > .btn,.fleet-owner-filters > .btn,.fleet-owner-table .mini-btn) { color: var(--text-primary); background: var(--panel-bg); border-color: var(--border); }
  body[data-ui-style="endfield"] #main.fleet-record-workspace :is(.fleet-record-actions > .btn,.fleet-owner-filters > .btn,.fleet-owner-table .mini-btn):hover { background: var(--control-bg-hover); }
  body[data-ui-style="endfield"] #main.fleet-record-workspace .fleet-ledger-metrics > div { background: #fbfaf7; }
  body[data-ui-style="endfield"] #main.fleet-record-workspace .fleet-role-metrics > div { background: #fbfaf7; }
  body[data-ui-style="endfield"] #main.fleet-record-workspace :is(#fleetAddRole,#fleetBatchRoles,#fleetSaveDraft):not(.primary) { color: var(--text-primary); background: var(--panel-bg); border-color: var(--border); }
  body[data-ui-style="endfield"] #main.fleet-record-workspace :is(#fleetAddRole,#fleetBatchRoles,#fleetSaveDraft):not(.primary):hover { background: var(--control-bg-hover); }
  body[data-ui-style="endfield"] #main.fleet-record-workspace .fleet-role-view-switch button:is(.primary,.active,[aria-pressed="true"],[aria-selected="true"]) { color: var(--primary-btn-text); background: var(--ef-yellow); border-color: var(--primary-btn-border); }
  body[data-ui-style="endfield"] #main.fleet-record-workspace .fleet-ledger-tabs .btn:is(.primary,[aria-selected="true"]) { background: transparent; color: var(--text-strong); border-bottom-color: var(--ef-yellow); }
  body[data-ui-style="endfield"]:has(#workspaceContent[data-ef-section="fleet"][data-ef-page="01"]) #siteRecommendations { display: none !important; }
}
@media screen and (max-width:700px) {
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="01"] .ef-page-header { min-height: 110px; height: auto; padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="01"] .ef-hero-copy { width: auto; flex: 1 1 170px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="01"] .ef-title { font-size: 27px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="01"] .ef-subtitle { margin-top: 4px; font-size: 11px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="01"] .ef-header-actions { align-self: flex-start; margin-top: 5px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="01"] #fleetHeaderImport { min-height: 34px; padding: 6px 9px; font-size: 11px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="01"] > #main.fleet-record-workspace { padding: 12px 10px 0; }
}

/* Personnel management keeps a compact banner above the aligned owner columns. */
@media screen {
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="02"] { --ef-hero-height: 128px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="02"] .ef-page-header { box-sizing: border-box; min-height: 128px; height: 128px; gap: 16px; padding: 14px var(--ef-content-pad); border-bottom-width: 2px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="02"] .ef-page-header::after { top: 16px; bottom: 16px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="02"] .ef-hero-copy { width: auto; max-width: 680px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="02"] .ef-eyebrow { margin-bottom: 5px; font-size: 11px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="02"] .ef-title { font-size: 34px; line-height: 1.2; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="02"] .ef-subtitle { display: block; margin-top: 6px; font-size: 12px; line-height: 1.5; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="02"] > #main.fleet-owners-workspace { padding-top: 16px; }
  body[data-ui-style="endfield"] .ef-header-actions[hidden], body[data-ui-style="endfield"] .ef-header-actions > [hidden] { display: none !important; }
  body[data-ui-style="endfield"] #main.fleet-owners-workspace :is(.owner-detail-actions .btn,.owner-add-form .btn):not(.primary):not(.danger) { background: var(--panel-bg); color: var(--text-primary); border-color: var(--border); }
  body[data-ui-style="endfield"] #main.fleet-owners-workspace :is(.owner-detail-actions .btn,.owner-add-form .btn):not(.primary):not(.danger):hover { background: var(--control-bg-hover); }
  body[data-ui-style="endfield"] dialog.owners-create-dialog header .btn { color: var(--text-secondary); background: transparent; border-color: transparent; }
  body[data-ui-style="endfield"] dialog.owners-create-dialog header .btn:hover { color: var(--text-strong); background: var(--control-bg-hover); }
  body[data-ui-style="endfield"]:has(#workspaceContent[data-ef-section="fleet"][data-ef-page="02"]) #siteRecommendations { display: none !important; }
}
@media screen and (max-width:760px) {
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="02"] .ef-page-header { min-height: 110px; height: auto; padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="02"] .ef-hero-copy { width: auto; flex: 1 1 165px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="02"] .ef-title { font-size: 27px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="02"] .ef-subtitle { margin-top: 4px; font-size: 11px; }
  body[data-ui-style="endfield"] #workspaceContent[data-ef-section="fleet"][data-ef-page="02"] > #main.fleet-owners-workspace { padding: 12px 10px; }
}

/* Opt-in action accents leave button geometry and native focus outlines intact. */
body[data-ui-style="endfield"] button[data-ef-star-border] { position: relative; }
body[data-ui-style="endfield"] button[data-ef-star-border] > svg.ef-star-border {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
body[data-ui-style="endfield"] .ef-star-border rect {
  fill: none;
  stroke: #f4ef20;
  stroke-width: 1.4px;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 10 90;
  stroke-dashoffset: 0;
  opacity: 0;
}
body[data-ui-style="endfield"] button.is-ef-star-running > .ef-star-border rect {
  animation: ef-star-sweep 700ms ease-out 1;
}
body[data-ui-style="endfield"] button:is(:disabled,[aria-disabled="true"],[aria-busy="true"]) > .ef-star-border rect {
  animation: none !important;
  opacity: 0 !important;
}
@keyframes ef-star-sweep {
  0% { stroke-dashoffset: 0; opacity: 0; }
  16%, 74% { opacity: .9; }
  100% { stroke-dashoffset: -100; opacity: 0; }
}

body[data-ui-style="endfield"] div.ef-warm-tooltip {
  position: fixed;
  z-index: 12000;
  box-sizing: border-box;
  width: max-content;
  max-width: min(280px, calc(100vw - 16px));
  pointer-events: auto;
}
body[data-ui-style="endfield"] .ef-warm-tooltip[hidden] { display: none !important; }
body[data-ui-style="endfield"] .ef-warm-tooltip__bubble {
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #66684e;
  border-radius: 3px;
  background: #252927;
  box-shadow: 0 8px 22px #0004;
  color: #f4f1e5;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  overflow: auto;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 140ms ease-out, transform 140ms ease-out;
}
body[data-ui-style="endfield"] .ef-warm-tooltip.is-open > .ef-warm-tooltip__bubble {
  opacity: 1;
  transform: none;
}

/* The existing sidebar controller retains timing, placement and arrow position. */
body[data-ui-style="endfield"] #primaryNavTooltip {
  padding: 8px 10px;
  border-color: #66684e;
  border-radius: 3px;
  background: #252927;
  box-shadow: 0 8px 22px #0004;
  color: #f4f1e5;
  font-size: 12px;
  line-height: 1.55;
}
body[data-ui-style="endfield"] #primaryNavTooltip::before { border-color: #66684e; background: #252927; }
body[data-ui-style="endfield"] #primaryNavTooltip .primary-nav-tooltip-heading strong { font-size: 12px; }
body[data-ui-style="endfield"] #primaryNavTooltip p { color: #d3d4c7; }
body[data-ui-style="endfield"] #primaryNavTooltip:not([hidden]) { animation: ef-nav-tip-reveal 140ms ease-out 1; }
@keyframes ef-nav-tip-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-ui-style="endfield"] .ef-star-border rect,
  body[data-ui-style="endfield"] #primaryNavTooltip { animation: none !important; }
  body[data-ui-style="endfield"] .ef-warm-tooltip__bubble { transition: none !important; transform: none !important; }
}
@media (forced-colors: active) {
  body[data-ui-style="endfield"] .ef-star-border rect { stroke: Highlight; }
  body[data-ui-style="endfield"] .ef-warm-tooltip__bubble,
  body[data-ui-style="endfield"] #primaryNavTooltip,
  body[data-ui-style="endfield"] #primaryNavTooltip::before { border-color: CanvasText; background: Canvas; color: CanvasText; box-shadow: none; }
  body[data-ui-style="endfield"] #primaryNavTooltip p,
  body[data-ui-style="endfield"] #primaryNavTooltip kbd { color: CanvasText; background: Canvas; }
}

/* Operation feedback stays in the document flow, above feature data. */
body[data-ui-style="endfield"] .ef-feedback-region { box-sizing:border-box; flex:0 0 auto; width:100%; padding:4px var(--ef-content-pad,18px); background:var(--bg-page,#f4f2eb); border-bottom:1px solid var(--border,#d8d9ce); font-size:12px; line-height:1.5; }
body[data-ui-style="endfield"] .ef-feedback-region[hidden] { display:none!important; }
body[data-ui-style="endfield"] .ef-feedback-region:empty { padding-top:0; padding-bottom:0; border-bottom-color:transparent; }
body[data-ui-style="endfield"] .ef-feedback-message { display:flex; align-items:center; gap:10px; min-height:30px; color:var(--text-primary,#262c2b); animation:ef-feedback-enter 160ms ease-out 1; border-left:2px solid #78877c; padding:2px 8px; }
body[data-ui-style="endfield"] .ef-feedback-message--error { border-left-color:#bc6e43; color:#7d3822; }
body[data-ui-style="endfield"] .ef-feedback-message--success { border-left-color:#6b8965; }
body[data-ui-style="endfield"] .ef-feedback-copy { min-width:0; flex:1; overflow-wrap:anywhere; }
body[data-ui-style="endfield"] .ef-feedback-message :is(.ef-feedback-retry,.ef-feedback-close) { flex:0 0 auto; min-height:28px; border:1px solid var(--border,#cacdc1); border-radius:2px; padding:2px 8px; color:inherit; background:transparent; font:inherit; cursor:pointer; }
body[data-ui-style="endfield"] .ef-feedback-message :is(.ef-feedback-retry,.ef-feedback-close):focus-visible { outline:2px solid var(--ef-yellow,#f4ef20); outline-offset:2px; }
body[data-ui-style="endfield"] .ef-feedback-message .ef-feedback-close { border-color:transparent; font-size:18px; }
body[data-ui-style="endfield"] .ef-feedback-message button:disabled { opacity:.5; cursor:wait; }
body[data-ui-style="endfield"] .ef-feedback-message.is-leaving { animation:ef-feedback-exit 160ms ease-in 1 both; pointer-events:none; }
body[data-ui-style="endfield"] .ef-feedback-more > summary { padding:3px 10px; color:var(--text-secondary,#59635a); cursor:pointer; }
@keyframes ef-feedback-enter { from { opacity:0; } to { opacity:1; } }
@keyframes ef-feedback-exit { to { opacity:0; } }
/* Fixed geometry keeps real status text and buttons in their original flow. */
body[data-ui-style="endfield"] .ef-operation-mark { display:inline-block; position:relative; width:14px; height:14px; margin-right:6px; vertical-align:-2px; color:#87918b; border-radius:50%; pointer-events:none; }
body[data-ui-style="endfield"] .ef-operation-mark svg { display:block; width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
body[data-ui-style="endfield"] .ef-operation-mark :is(circle,path) { transition:opacity 140ms ease-out; }
body[data-ui-style="endfield"] .ef-operation-ring { opacity:.4; }
body[data-ui-style="endfield"] .ef-operation-mark :is(.ef-operation-check,.ef-operation-cross) { opacity:0; }
body[data-ui-style="endfield"] .ef-operation-mark[data-state="running"] { color:#a49417; }
body[data-ui-style="endfield"] .ef-operation-mark[data-state="running"] .ef-operation-ring { opacity:1; stroke-dasharray:31 44; transform-origin:10px 10px; animation:ef-operation-spin 1000ms linear infinite; }
body[data-ui-style="endfield"] .ef-operation-mark[data-state="running"] .ef-operation-dash { opacity:0; }
body[data-ui-style="endfield"] .ef-operation-mark[data-state="done"] { color:#708b5d; }
body[data-ui-style="endfield"] .ef-operation-mark[data-state="failed"] { color:#ba6d46; }
body[data-ui-style="endfield"] .ef-operation-mark:is([data-state="done"],[data-state="failed"]) :is(.ef-operation-ring,.ef-operation-dash) { opacity:0; }
body[data-ui-style="endfield"] .ef-operation-mark[data-state="done"] .ef-operation-check,body[data-ui-style="endfield"] .ef-operation-mark[data-state="failed"] .ef-operation-cross { opacity:1; }
body[data-ui-style="endfield"] .ef-operation-mark.is-confirming { animation:ef-operation-confirm 650ms ease-out 1; }
body[data-ui-style="endfield"] #sidebarAccountQuick { position:relative; }
body[data-ui-style="endfield"] #sidebarAccountQuick .ef-operation-mark { position:absolute; right:3px; bottom:2px; margin:0; background:#18221c; color:#d3d6b7; }
body[data-ui-style="endfield"] #sidebarAccountQuick .ef-operation-mark[data-state="done"] { color:#a3bd8b; }
body[data-ui-style="endfield"] #sidebarAccountQuick .ef-operation-mark[data-state="failed"] { color:#df9c75; }
@keyframes ef-operation-spin { to { transform:rotate(360deg); } }
@keyframes ef-operation-confirm { 30% { box-shadow:0 0 7px #a7b87455; } }
/* Only the indicator travels. Original control geometry and events are kept. */
body[data-ui-style="endfield"] .starmap-mode-segment { display:inline-flex; align-items:center; gap:inherit; flex:none; }
body[data-ui-style="endfield"] .ef-segmented { position:relative; isolation:isolate; }
body[data-ui-style="endfield"] .ef-segment-indicator { position:absolute; z-index:0; pointer-events:none; background:var(--ef-yellow,#f4ef20); border:1px solid #d9d523; border-radius:3px; }
body[data-ui-style="endfield"] .ef-segmented > button { position:relative; z-index:1; background:transparent!important; transition:color 140ms ease-out; }
body[data-ui-style="endfield"] .ef-segmented > button[aria-pressed="true"] { color:#1b211c!important; }
@media(max-width:760px) { body[data-ui-style="endfield"] .ef-feedback-region { padding-left:10px; padding-right:10px; } body[data-ui-style="endfield"] .ef-feedback-message { gap:6px; } }
@media(prefers-reduced-motion:reduce) { body[data-ui-style="endfield"] :is(.ef-feedback-message,.ef-operation-mark,.ef-operation-ring),body[data-ui-style="endfield"] .ef-operation-mark :is(circle,path),body[data-ui-style="endfield"] .ef-segmented > button { animation:none!important; transition:none!important; } }
@media(forced-colors:active) { body[data-ui-style="endfield"] .ef-operation-mark { color:CanvasText!important; background:Canvas!important; } body[data-ui-style="endfield"] .ef-segment-indicator { background:Highlight; border-color:Highlight; } body[data-ui-style="endfield"] .ef-segmented > button[aria-pressed="true"] { color:HighlightText!important; } }
/* Quiet detail transitions; the feature modules still own open, close and focus. */
body[data-ui-style="endfield"] .contract-drawer-root .contract-drawer {
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 180ms ease-out, transform 180ms ease-out;
}
body[data-ui-style="endfield"] .contract-drawer-root.open .contract-drawer {
  opacity: 1;
  transform: translateX(0);
}
body[data-ui-style="endfield"] .contract-drawer-root .contract-drawer-mask { transition: background 180ms ease-out; }

/* Draw above the native checkbox briefly, without replacing its hit area or semantics. */
body[data-ui-style="endfield"] svg.ef-check-feedback {
  position: fixed;
  z-index: 12500;
  box-sizing: border-box;
  pointer-events: none;
  overflow: visible;
}
body[data-ui-style="endfield"] .ef-check-feedback path {
  fill: none;
  stroke: #ded441;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

/* A decorative inset rail does not change sidebar width, padding, icons or labels. */
body[data-ui-style="endfield"] #secondaryNav :is(.secondary-nav-btn,.industry-nav-group > summary) { position: relative; }
body[data-ui-style="endfield"] #secondaryNav :is(.secondary-nav-btn,.industry-nav-group > summary)::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: currentColor;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease-out;
}
body[data-ui-style="endfield"] #secondaryNav :is(.secondary-nav-btn.active,.secondary-nav-btn[aria-current="page"],.industry-nav-group.is-current > summary)::before { opacity: .75; }
body[data-ui-style="endfield"] #secondaryNav :is(.secondary-nav-btn,.industry-nav-group > summary).ef-line-arriving::before { animation: ef-line-arrive 180ms ease-out 1; }
@keyframes ef-line-arrive { from { opacity: 0; } to { opacity: .75; } }
@media (prefers-reduced-motion: reduce) {
  body[data-ui-style="endfield"] .contract-drawer-root .contract-drawer,
  body[data-ui-style="endfield"] .contract-drawer-root .contract-drawer-mask,
  body[data-ui-style="endfield"] #secondaryNav :is(.secondary-nav-btn,.industry-nav-group > summary)::before { transition: none !important; }
  body[data-ui-style="endfield"] .contract-drawer-root .contract-drawer { transform: none !important; }
  body[data-ui-style="endfield"] svg.ef-check-feedback { display: none; }
  body[data-ui-style="endfield"] #secondaryNav .ef-line-arriving::before { animation: none !important; }
}

/* One top band follows the unchanged logo/account/server rail on every page.
 * This owns height over legacy per-feature banner and narrow-map rules. */
@media screen {
  body[data-ui-style="endfield"].sidebar-enabled {
    --ef-top-band-height: var(--ef-nav-controls-height);
  }
  body[data-ui-style="endfield"].sidebar-enabled #workspaceContent {
    --ef-hero-height: var(--ef-top-band-height) !important;
  }
  body[data-ui-style="endfield"].sidebar-enabled #workspaceContent > #endfieldPageHeader,
  body[data-ui-style="endfield"].sidebar-enabled #workspace > #secondaryNavCard > .module-nav-header,
  body[data-ui-style="endfield"].sidebar-enabled #achievementsPage .achievement-heading,
  body[data-ui-style="endfield"].sidebar-enabled #infinityPublicPage .infinity-public-banner {
    box-sizing: border-box;
    height: var(--ef-top-band-height) !important;
    min-height: var(--ef-top-band-height) !important;
    max-height: var(--ef-top-band-height) !important;
    flex: 0 0 var(--ef-top-band-height);
  }
  body[data-ui-style="endfield"].sidebar-enabled #workspaceContent > #endfieldPageHeader {
    padding: 12px var(--ef-content-pad) !important;
    align-items: center;
    flex-wrap: nowrap;
  }
  body[data-ui-style="endfield"].sidebar-enabled #endfieldPageHeader .ef-eyebrow {
    margin-bottom: 5px;
    font-size: 11px;
    line-height: 1.3;
  }
  body[data-ui-style="endfield"].sidebar-enabled #endfieldPageHeader .ef-title {
    font-size: clamp(24px, 2.4vw, 36px) !important;
    line-height: 1.2 !important;
  }
  body[data-ui-style="endfield"].sidebar-enabled #endfieldPageHeader .ef-subtitle {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
  }
  body[data-ui-style="endfield"].sidebar-enabled #workspaceContent > #endfieldPageHeader.ef-header-brand-below {
    align-items: flex-start;
    padding-top: 8px !important;
    padding-bottom: 48px !important;
  }
  body[data-ui-style="endfield"].sidebar-enabled #endfieldPageHeader.ef-header-brand-below .ef-subtitle { display: none !important; }
  body[data-ui-style="endfield"].sidebar-enabled #endfieldPageHeader.ef-header-brand-below .ef-header-brand { width: min(140px, calc(100% - 32px)); }
  body[data-ui-style="endfield"].sidebar-enabled #achievementsPage > .achievements-page { padding-top: 0 !important; }
  body[data-ui-style="endfield"].sidebar-enabled :is(.achievement-heading,.infinity-public-banner).ef-native-branded { position: relative; }
  body[data-ui-style="endfield"].sidebar-enabled #achievementsPage .achievement-heading { padding-top: 12px; padding-bottom: 12px; }
  body[data-ui-style="endfield"].sidebar-enabled #infinityPublicPage .infinity-public-banner { padding: 12px var(--ef-content-pad) !important; }
  body[data-ui-style="endfield"].sidebar-enabled #achievementsPage .achievement-heading.ef-header-brand-below { align-items: flex-start; padding-top: 12px; }
  body[data-ui-style="endfield"].sidebar-enabled .ef-native-branded.ef-header-brand-below p { display: none; }
  body[data-ui-style="endfield"].sidebar-enabled .ef-native-branded.ef-header-brand-below .ef-header-brand { width: min(140px, calc(100% - 32px)); }
  body[data-ui-style="endfield"].sidebar-enabled #achievementsPage .achievement-heading.ef-header-brand-below .achievement-heading-actions {
    position: absolute; left: 0; right: 164px; bottom: 12px; width: auto; gap: 8px; justify-content: flex-start;
  }
  body[data-ui-style="endfield"].sidebar-enabled #achievementsPage .achievement-heading.ef-header-brand-below .achievement-overall-progress { flex: 0 1 auto; }
  body[data-ui-style="endfield"].sidebar-enabled #achievementsPage .achievement-heading.ef-header-brand-below .achievement-overall-track { display: none; }
}
@media screen and (max-width:700px) {
  body[data-ui-style="endfield"].sidebar-enabled #endfieldPageHeader .ef-eyebrow { font-size: 10px; }
}
